Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Nub here - can't make this compiler work properly -
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Chapel




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Wed Jul 07, 2004 2:16 am   Post subject: (No subject)

what complier are you using?
wtd




PostPosted: 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
JR




PostPosted: 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.
Mazer




PostPosted: 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).
wtd




PostPosted: 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.
Andy




PostPosted: 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?
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: