목록전체 글 (159)
할껀하고놀자
#include #include using namespace std; int main(){ queue q; q.push(7); q.push(5); q.push(4); q.pop(); q.push(6); q.pop(); while (!q.empty()) { cout
#include #include using namespace std; int main(){ stack st; st.push(7); st.push(5); st.push(4); st.pop(); st.push(6); st.pop(); while (!st.empty()) { cout
#include #include #include using namespace std; class Student { public: string name; int score; Student(string name, int score) { this->name = name; this->score = score; } // 정렬 기준은 '점수가 작은 순서' bool operator score < student.score; } }; int main(void) { Student students[] = { Student("유동관", 90), Student("김범현", 93), Student("권오현", 97), Student("강종구", 87), Student("이태일", 92) }; sort(students, stude..