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

Username:   Password: 
 RegisterRegister   
 new to c++
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
beedub




PostPosted: Sun May 09, 2004 1:39 pm   Post subject: new to c++

hey all, i want to get into c++, i was wondering how do veiw programs/make them? in notepad or..?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun May 09, 2004 2:00 pm   Post subject: (No subject)

you could use any editor. Notepad will do Smile I personally prefer VC++ for the dropdown of class's methods.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Catalyst




PostPosted: Sun May 09, 2004 2:46 pm   Post subject: (No subject)

I would recommend getting Dev C++ from http://www.bloodshed.net/ its full-featured, easy to use and free. Since youre new to C++ i would also recommend either picking up a good c++ book or looking at some free online material (like here http://www.freeprogrammingresources.com/cppbooks.html )
guruguru




PostPosted: Sun May 09, 2004 4:42 pm   Post subject: (No subject)

I suggets C++ Programming for the Absolute Begginer. That is the second book I bought, after I found C++ for Dummies very dry. Just my $0.02
beedub




PostPosted: Sun May 09, 2004 5:09 pm   Post subject: (No subject)

ty guys, that will do, hopefully ill be able to send in my submissions soon
wtd




PostPosted: Mon May 10, 2004 5:01 am   Post subject: (No subject)

I'd also reccomend installing Dev-C++, but to avoid confusing the features of the C++ language with Dev-C++ the Integrated Development Environment, edit your programs in a text editor (TextPad is my editor of choice) and compiling from the commandline.

To do this, select "Run" from the Start Menu (this assumes you're using Windows) and type "cmd".

You'll get what looks like a DOS screen. It is, more or less. Change to the directory your C++ source file is in, then type:

code:
C:\My Code> g++ <mysourcefile.cpp> -o <myexefile.exe>


The following is a very simple "Hello world" program (saved in the text file "hello_world.cpp") to get you started:

code:
#include <iostream>

int main()
{
   std::cout << "Hello world" << std::endl;

   system("PAUSE");

   return 0;
}


Now...

code:
C:\My Code> g++ hello_world.cpp -o hello_world.exe
C:\My Code> hello_world
Hello world
Press any key to continue . . .

C:\My Code>
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  [ 6 Posts ]
Jump to:   


Style:  
Search: