Just purchased an easy to read guid for c++ programing.
Inside the book it gives an example greeting application through using cpp code to Exe. The book demonstrates compiling using an app called Mingw. I tried to set up the pp following the instructions given, such as add environment variables to the PATH Variable C:\mingw\bin. It then states to open up a command promptand enter c++, toward whereby the result should state nothing has been specified for compilation. Firstly, i haven't the slightest clue as to what Promt i should use. I tried opening up the GUI for Mingw but it won't open.
So i decided to go for Microsoft vc 10 express. Using this, i create a Cpp greeting file with the basic 'hello' code. Can't compile and debug a single cpp file, so i then understood that i must use the variable 'project' for the cpp file to be recognised and compiled.
Firstly should i use build or debug? What does each do? I am trying tocreate a CPP with a exe file. I pres build and after debug the program says it scannot find hello.exe? Please help.
Am i missing something.....please how to i create an exe from the cpp file??
It then states to open up a command promptand enter c++
it is reffering to the windows command promt.
if you are using windows 7: click windows logo and type "cmd" <enter>.
this will open a command promt for you.
when using vc++ express you don't need to configure anything. just create a new application and choose empty project. add a new cpp file and enter your code and press the "run" button.
The only green triangle i can find is 'Start Debuging.' and it is not available, (Greyscale- it won't t let me click it? I am editing a source CPP file not a project? Must i use a project for it to work?
Thanks, like i said in my first post, i hit the build buton first to build the coded. Then, either beofre or after this, i hit the green (G0) debug button. Then i nget a pop- up error saying 'Hello.exe' cannot be found. Basiacally i don;t know how to solve this?
it sounds weird. when the executable is not present it normally means the compile has not succeeded. and when you hit "start debugging" it should build automaticly.
Or at least ask you for it.
That's what i mean, it's not compiling the Cpp to the exe. AS soon as i hit debug run, it does something in the bottom part of the interface, to signal something has compiled, as soon as it happens ath eerror ge pops up.
When it worked before, it completed the process and made the exe!!!
I have tried this many times, still remains an error?
The code is fine. Whatever the problem is, it's not a C++ problem. It's a problem with the setup of your IDE. You'll have better luck at a forum of your IDE, rather than a C++ forum.
That's what i mean, it's not compiling the Cpp to the exe. AS soon as i hit debug run, it does something in the bottom part of the interface, to signal something has compiled, as soon as it happens ath eerror ge pops up.
Maybe you should pay more attention to the something going on in the bottom part of the interface.