Author |
Message |
Chapel
|
Posted: Tue Jul 06, 2004 9:50 pm Post subject: Nub here - can't make this compiler work properly - |
|
|
I'm a nub trying to get this compiler to run a example program but when i try to run an example program it doesn't run when i click on compile&run
#include <iostream>
using namespace std;
int main (int argc, char *argv[])
{
char quit;
quit = '\0';
while (quit != 'q')
{
cout << "Hello ! This is a console app." << endl;
cout << "To create a console, go to Project Options and select" << endl;
cout << "\'Win32 Console\'." << endl;
cout << "Press q to quit " << endl;
cin >> quit;
}
return 0;
}
That's what i paste onto the page but the compile log says this
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Owner\My Documents\willie\Dev-Cpp\Examples\Hello\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Owner\My Documents\willie\Dev-Cpp\Examples\Hello\Makefile.win" all
Execution terminated
And the compiler tab says that it's unable to run program. What am I supposed to do? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Andy
|
Posted: Wed Jul 07, 2004 2:16 am Post subject: (No subject) |
|
|
what complier are you using? |
|
|
|
|
![](images/spacer.gif) |
wtd
|
Posted: Wed Jul 07, 2004 2:39 am Post subject: (No subject) |
|
|
It's quite possible Dev-C++ is screwing up the makefile. For a program this simple you don't need a makefile.
Save the code you showed us in a text file called "hello_world.cpp". Open a CMD window ("Start" -> "run" -> "cmd"). Navigate top the file. Use the ffollowing commands.
code: | g++ hello_world.cpp -o hw.exe
hw |
|
|
|
|
|
![](images/spacer.gif) |
JR
|
Posted: Wed Sep 22, 2004 6:21 pm Post subject: Re: Nub here - can't make this compiler work properly - |
|
|
umm i think that it should be #include <iostream.h>. u forgot the h in yours.
But u might be using a different compiler so u dont need the h but just in case try it. |
|
|
|
|
![](images/spacer.gif) |
Mazer
![](http://compsci.ca/v3/uploads/user_avatars/1323750815476d9f446d80c.png)
|
Posted: Wed Sep 22, 2004 6:24 pm Post subject: (No subject) |
|
|
JR, iostream and iostream.h aren't (exactly) the same. The way he's using it is fine, on any compiler I believe, assuming he has it in his include folder (which he most likely does). |
|
|
|
|
![](images/spacer.gif) |
wtd
|
Posted: Wed Sep 22, 2004 6:46 pm Post subject: (No subject) |
|
|
code: | #include <iostream> |
Is the proper way of doing things.
code: | #include <iostream.h> |
Is obsolete. |
|
|
|
|
![](images/spacer.gif) |
Andy
|
Posted: Wed Sep 22, 2004 10:38 pm Post subject: (No subject) |
|
|
arggg.. why do ppl bring back old question topics months after they were asked? |
|
|
|
|
![](images/spacer.gif) |
|