So I downloaded Dev C++ which is very hard to use since at our Programming class, we use MS Visual Studio 6.0 and it's not a freeware so i can't download online.
My problem with Dev C++ is that my codes run but it closes when I enter something.
Also, are there anymore IDE/compiler as alternative for MS VS 6.0?
Is used when you need to create string datatype, like in my sample above i needed to take user name which is string---I included <string> library because string is not fundamental datatype as float ,double...e.t.c
I had the problem again! Some of my codes doesn't work using system("PAUSE");
Our instructor never taught us to use that code! Do I really need to put that code on EVERY program I make on DevC++!?
it's just an ide, so it works correct, only if you do correct coding (just like all ide's and programs)..
What you need to do is add cin.ignore(numeric_limits<streamsize>::max(), '\n');
What this does is wait for enter to be pressed.. This is better then system("pause")...
And yes, you need to place something like this in every program, unless you want it to run successfully and then close down. What this (and system(pause)) does is wait for the user to press enter when ready. So now the program has to wait with closing down until the user presses enter :)
I'm using MVC++ 2010 Express for my IDE and it doesn't exit programs as soon as they're done so it can be to do with the IDE you're using. One thing you can do is create a batch file in Notepad witch contains two lines, the program name (e.g. Hello_world.exe) and 'pause' then save it with the .bat extension. That should stop it from exiting immediately at the finish if you double click that batch file or you could use a different IDE that automatically keeps open the command window.