Commit 18708ab7 by Szeberényi Imre

kiirasok jav

parent 4a9c0446
......@@ -16,22 +16,37 @@ using std::endl;
struct Valami {
Valami() { cout << "HAHO megszulettem!" << endl; }
~Valami() { cout << "Jaj, itt a kaszas!" << endl; }
~Valami() { cout << "JAJ, vegem van!" << endl; }
};
int main() {
cout << "1." << endl;
int db = 0;
cout << ++db << ". ";
Valami o1;
cout << "2." << endl;
cout << ++db << ". ";
Valami o2;
cout << "3." << endl;
cout << ++db << ". (new) ";
Valami *o3 = new Valami;
cout << " (delete) ";
delete o3;
cout << "--- blokk elott: ---\n";
{
cout << ++db << ". ";
Valami o1;
}
cout << "--- blok utan: ---\n";
#ifdef _FOR
for (int i = 0; i < 5; i++)
cout << "--- For indul ---" << endl;
for (int i = 0; i < 5; i++) {
cout << ++db << ". ";
Valami o1;
}
cout << "--- Vege ----" << endl;
#endif // _FOR
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment