there is one way to open window, where you must input that stdafx
Stdafx is a VC++ generated header. I always remove Stdafx from all of my projects, and yet, my projects compile just fine. The Stdafx header is not a requirement.
Framework i don't say there is only way to open window i say i know way opening window, where include<stdafx.h> is necessary......if you want i could tell you that way.....ok?
david91, as both me and framework have pointed out it's a VC++ generated header so it isn't going to help the Boreeas, because he is using NetBeans.
@chipp, it is mainly for Java but it supports C/++ as well, though I don't see why anyone would develop in it as opposed to the countless other and "better" C/++ IDE's out there.
It might be a bit bulky to use at first but there are a lot of handy features in it that have become indisposable for me (I am not a sales rep from Microsoft ;) ).
As for your code, it should work which leads me to believe that it's probably your IDE.
I hope this helps!
P.S: If your a student, it might be worth your while to check with your school to see if they have a software licensing agreement with Microsoft (the program is called the MSDN Academic Alliance), which entities you to free software not limited to Visual Studio 2008/2010.
I would also blame some sort of poor NetBeans/compiler configuration, but without any further details I won't be able to pinpoint it.
Maybe try reinstalling everything? *shrug*
Finally, in my experience Netbeans is actually a pretty decent IDE. Its code completion glitches at times and its C++0x support is iffy, but at least it runs properly when it's on OS X (I've had major issues with C::B).
When I rarely do Java NetBeans can be nice, but I still think that Visual C++ 2008 is much better for C++ development. david91, go ahead in another thread, I'm just saying that it isn't relevant to the OP because stdafx.h is generated by Visual Studio and it won't work in NetBeans.
P.S: If your a student, it might be worth your while to check with your school to see if they have a software licensing agreement with Microsoft (the program is called the MSDN Academic Alliance), which entities you to free software not limited to Visual Studio 2008/2010.
Yup, got Windows 7 Professional for free from them :)