I decided to try Visual Studio 2012 Express today. First thing to do was to write "Hello world!" application, however, I couldn't make it work. I created a Windows console application project, wrote standard code and it resulted in a run-time error.
Here's my code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
system("pause");
return 0;
}
Looks like something is broken (maybe I missed something?). It gets a runtime error at line 7:
http://img443.imageshack.us/img443/7497/coutbroken.png
Any help please? :)
Since DeadMG's answer is rude and vague:
Visual Studio 2012 targets SSE2-enabled machines by default, which includes virtually any processor made in the last ten years. Unfortunately, your AMD Athalon XP is twelve years old, and does not have SSE2, so to run your programs, you'll need to disable those instructions.
On Visual Studio 2008 (you don't have this) the way was to open the "Solution Window", right click the project -> Properties -> Configuration Properties -> C++ -> Code Generation -> Enable Enhanced Instruction Set. Set this to "Not Set".
You have Visual Studio 2012 (I don't), so your instructions will differ. The official instructions are: Open the Property Pages dialog box for the project, Select the C/C++ folder, Select the Code Generation property page, and Modify the Enable Enhanced Instruction Set property. source.
Your CPU is in urgent need of being junked. Your compiler is probably set for a CPU from this century. You may be able to disable the newer instructions like SSE2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With