- while( cin.getline( inputs, sizeof inputs ) )
- {
- STUDENT_SCORE score;
- sscanf( inputs, "%s%s%u", score.name, score.id, &score.eng );
- scores.emplace_back( score );
- orders[ score.eng ]++;
- }
- int accumulation = scores.size();
- for( auto& order : orders )
- order = ( accumulation -= order ) + 1;
- for( const auto& score : scores )
- cout << score.name << " " << score.id << " " << score.eng << " "
- << orders[ score.eng ] << endl;
일단 auto가 뭔지 몰라서 찾아봤는데 무슨 메모리최적화할당? ㅇㅋ 좋은데
auto& order : orders가 뭔말인지 모르겠음
아니 신입생용으로 코드 짜주신거 맞음 ;;?
풀어쓰면 auto void& order = orders ?
auto 는 그냥 rvalue 에서 타입 참조해 오는거야.
orders 배열에서 자동으로 하나씩 꺼내서 order 란 이름 갖게 하는거지.
dzdz
understand
이 아죠씨 dev c++ 98까지밖에 지원안된다구여 비쥬얼 키게하쉬네
ㅋㅋㅋㅋㅋㅋㅋㅋㅋ