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

Username:   Password: 
 RegisterRegister   
 Where do i start?
Index -> Programming, C++ -> C++ Help
Goto page Previous  1, 2, 3, 4
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Tue Feb 22, 2005 11:34 pm   Post subject: (No subject)

CompWiz333 wrote:
kk, one more time, when it says "no input files" what do i do? i forget


You provide the name of your source file.

code:
#include <iostream>

int main()
{
   std::cout << "Hello, world!" << std::endl;
   return 0;
}


Save that as hello.cpp, and compile with:

code:
g++ hello.cpp


Then run with:

code:
./a.out


a.out is the name of the output file by default, but you can use the "-o" option to specify an output file.

code:
g++ hello.cpp -o hello


code:
./hello
Sponsor
Sponsor
Sponsor
sponsor
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 4 of 4  [ 46 Posts ]
Goto page Previous  1, 2, 3, 4
Jump to:   


Style:  
Search: