Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 09-18-2004, 09:35 PM   #1 (permalink)
 
Super Techie

Join Date: Jan 2004

Posts: 297

BlindApex

Send a message via AIM to BlindApex
Default New to C++

hey, i'm learning c++ now on my own, and i was wondering if someone could give me a step-by-step guide to saving and compiling code using the ANSI standard C++. What would be the best compiler and how do I use it, I cant seem to run the other ones I have tried

thx
__________________
[size=2]
AMD 64 3200+ Socket 939
DFI LanParty nF4 SLI-DR
BFG GeForce 6600GT OC
WD Caviar 200GB SATA-II
Thermaltake Venus 12 HSF
CoolerMaster Wavemaster Case

|P|A|I|N|T|B|A|L|L|
my anti-drug
BlindApex is offline  
Old 09-18-2004, 11:54 PM   #2 (permalink)
 
Super Techie

Join Date: Jun 2004

Posts: 312

sippin codeine

Send a message via Yahoo to sippin codeine
Default

Hey, first download the free c++ compiler provided by BORLAND
take there survey and you will be compile in no time. http://www.borland.com/products/down..._cbuilder.html

then to use it read this 3 page article
http://cplus.about.com/library/weekly/aa031502a.htm V 5.5

You migh be interested in Delphi also which is made by Borland, It is a High power alternative to Visual Basic used for making rapid windows programs, it comes with an IDE, which is really stable, solid and, it is based on Pascal, a very strong programming language, while VB is based on a "Basic" programming language.
__________________
**[System specs]**

Delphi Enterprise 6 - 7
VB 6.0 - 2005 EE
sippin codeine is offline  
Old 09-19-2004, 11:39 AM   #3 (permalink)
 
Super Techie

Join Date: Jan 2004

Posts: 297

BlindApex

Send a message via AIM to BlindApex
Default

okay, i think i got it working

however, i think my code has some errors in it...

this is what i wrote:

/* Program #1 - A first C++ program.

Enter this program, then compile and run it.
*/

#include <iostream>
using namespace std;

int main()
{
cout << "This is my first C++ program.";

return 0;
}

-----------------------------------------------------------------------

when i try to compile it, i get "*** 3 errors in Compile ***"

Error E2209 c:\mycode\1.cpp 6: Unable to open include file 'iostream'

Error E2282 c:\mycode\1.cpp 7: Namespace name expected

Error E2451 c:\mycode\1.cpp 11: Undefined symbol 'cout' in function main()



I'll keep trying, but any suggestions?
__________________
[size=2]
AMD 64 3200+ Socket 939
DFI LanParty nF4 SLI-DR
BFG GeForce 6600GT OC
WD Caviar 200GB SATA-II
Thermaltake Venus 12 HSF
CoolerMaster Wavemaster Case

|P|A|I|N|T|B|A|L|L|
my anti-drug
BlindApex is offline  
Old 09-19-2004, 04:47 PM   #4 (permalink)
 
Super Techie

Join Date: Jun 2004

Posts: 312

sippin codeine

Send a message via Yahoo to sippin codeine
Default

First make sure you have setup your environment variables, then put this in the hello.cpp file, i'm using images because i think this forum has a bug, it wont let me type iostream.h



to compile goto command type cd c:\Location of your source file (c:\mycode)

then type bcc32 hello.cpp

after it compiles you test it py typing Hello.exe,
you should get the "This is my first c++ program" as an output.

It worked fine for me. any questions let me know.


__________________
**[System specs]**

Delphi Enterprise 6 - 7
VB 6.0 - 2005 EE
sippin codeine is offline  
Old 09-21-2004, 09:31 PM   #5 (permalink)
 
Junior Techie

Join Date: Oct 2003

Posts: 50

Scripter

Default

#include = always has some type of library following it.

such as <i o s t r e a m> as you should have typed after it includes functions such as "cout" that you used to display your message.

i spaced the library name because as "sippin" posted the forum has some type of problem when you write it out and doesnt post it.
Scripter is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On