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

Username:   Password: 
 RegisterRegister   
 Setting up a C++ compiler for Windows Command-Line
Index -> Programming, C++ -> C++ Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Thu Nov 04, 2004 1:36 am   Post subject: (No subject)

CompWiz333 wrote:
heres what is on screen right now:

code:
Bad command or file name
C:\WINDOWS>path
PATH=C:\WINDOWS\COMMAND\g++.exe


its there, now what? ...


Now, create a simple C++ program called hello.cpp.

code:
#include <iostream>

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


And compile it:

code:
C:\Directory\your\program\is\in> g++ hello.cpp -o hello.exe


Then run it with:

code:
C:\Directory\your\program\is\in> hello
Sponsor
Sponsor
Sponsor
sponsor
apomb




PostPosted: Thu Nov 04, 2004 2:41 am   Post subject: (No subject)

oh man ... this is pissing me off, nothing is working, every time i push enter, it says "bad command or file name" and goes right back to

code:
C:\WINDOWS>


not just plain

code:
C:\>


WTF!
wtd




PostPosted: Thu Nov 04, 2004 3:43 am   Post subject: (No subject)

CompWiz333 wrote:
oh man ... this is pissing me off, nothing is working, every time i push enter, it says "bad command or file name" and goes right back to

code:
C:\WINDOWS>


not just plain

code:
C:\>


WTF!


You're in the C:\Windows directory. To change directories use:

code:
C:\whatever> cd target_directory


If that directory is on a different drive...
code:
C:\whatever> f:


To change to the F drive, as an example.
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 2 of 2  [ 18 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: