Witam
Stworzyłem klasę, w niej strukturę, do której utworzyłem kontener na dane - listę. Każde odwołanie do składowych tej struktury poprzez iterator wywala mi program. Jakieś pomysły ?
#include <iostream> #include <list> using namespace std; class C_table { private: string tab[15][30]; struct fruit { int x; int y; string sign; fruit(int send_x, int send_y, string send_sign="*") : x(send_x), y(send_y), sign(send_sign){}; }; public: list<fruit>tab_fruit; list<fruit>::iterator it_f; C_table() { cout << "Utworzony"<< endl; } }; int main() { C_table table; table.tab_fruit.emplace_back(2,4); table.it_f = table.tab_fruit.end(); cout << table.it_f->sign; return 0; }