+ 1

compile error C2228

left of '.push_back' must have class/struct/union void Database::append(Account const& db) { Accounts.push_back(db); }; Accounts is highlighted and its telling me expression must have class type.

30th Nov 2018, 10:12 PM
Brandon Autry
Brandon Autry - avatar
1 ответ
+ 2
Kindly post the complete code, or just the declaration of Accounts and the Account class. The information provided so far was not sufficient to determine why the error showed up.
1st Dec 2018, 3:00 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar