-6
World::World() {
int width = -1;
int height = -1;
cout << "Aby rozpoczac gre wpisz rozmiar planszy" << endl;
cout << "Aby uruchomic domyslne romiary zostaw pole puste" << endl;
cout << "Podaj szerokosc: ";
// I don't see what i'm typing and i need to press enter twice;
cin >> width;
cout << "Podaj wysokosc: ";
// I don't see what i'm typing too and make my program crash
cin >> height;
World(height, width);
}
cout工作很好,但cin是soooo buged。 虽然第一个cin我没有看到我在输入什么,我需要按两次输入; 虽然SECEND CIN我什么也没看到过,虽然我按任意键,程序崩溃C++ <iostream> cin不能正常工作
的代码你展示我们应该工作。你的问题在别处。 –
你觉得'世界(高度,宽度)是多少'? –
我的建议是学会使用调试器。并且不要急于认为您发现了某种类型的编译器或系统错误。 – drescherjm