SOLVED THANKS TO KEYSER and BigFatCow.. ~!!!!!

isekii

Lifer
Mar 16, 2001
28,578
3
81
//Fig. 1.2: fig01_02.cpp
// A first program in C++
#include <iostream>

int main()
{
std::cout << "Welcome to C++!";

return 0;
}


this is what I have..

How would I view this and print it??
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Yeah, I can help you because the description of your program was SOOO clear. (blank post?)
 

isekii

Lifer
Mar 16, 2001
28,578
3
81


<< Yeah, I can help you because the description of your program was SOOO clear. (blank post?) >>



I'm typing it dammit~!!!!!!!

i pressed return by accident~ :)
 

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Do you mean you want to execute it? Or just print the instructions out? I'm STILL confused. What compiler you using?


MORE details.....PLEASE


KeyserSoze
 

isekii

Lifer
Mar 16, 2001
28,578
3
81
I'm using visual C++ and the teacher said.. we need to make sure there are no errors.. and print out the output file ??

it's suppose to be just a screen with text saying

Welcome to C++!


I think i need to print that..~
 

BigFatCow

Diamond Member
Aug 11, 2001
3,373
1
0
ok visual c++

go to build>compile>then after compiled do F7 or click the ! on the bar thingy...
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
edit - yes, that's all it does is say "welcome to C++" What did you expect it to do, be CS 1.4?
 

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
Oh, I gotcha.

Have you compiled it yet? Does it have errors? And when it shows on your computer, just hit print screen, and paste it into an image program (MS-Paint, Adobe Photoshop, etc.)

If you have IM, talk to me right now, this is impossible:

VipBadBoy <--IM Screen name




KeyserSoze
 

isekii

Lifer
Mar 16, 2001
28,578
3
81


<< edit - yes, that's all it does is say "welcome to C++" What did you expect it to do, be CS 1.4? >>



dude you're not helping me.. but getting me pissed off~~~

I just started.. and my stupid book dont tell me anything..

it doesn't even tell me how to view the file.~

 

Mungla

Senior member
Dec 23, 2000
843
0
71
We just use Borland's C++ compiler. It is pretty good for the beginner. They're several different styles of writing C++, but I've always been taught like BigFatCow.

Print statements are simple:
cout << "how are you?";

Also, I don't know if this matters or not, but your #include <iostream.h> lookup is missing the .h at the end.
 

isekii

Lifer
Mar 16, 2001
28,578
3
81
I don't know that's what the book's example is in

deitel & deitel..


if you are having problems take it up with the writer..

I'm merely trying to get the example to work~~

:)

 

Tyrant222

Senior member
Nov 25, 2000
802
0
0
My first suggestion is try to get it to compile, this should be fairly easy just by messing around with the program. I also suggest taking out the 'std::' and as mentioned above, there needs to be a .h after iostream.

By the way if you didn't know, compiling it will make it run in a dos window.

I've had Visual C++ and Borland 5. I like Borland better.
 

isekii

Lifer
Mar 16, 2001
28,578
3
81
Alright..


I had one guy help me.. but it was no go..~ :(

Cow is helping me now..

I'll keep ya guys posted.

BTW i'm running win xp.. could that be the problem ??
 

isekii

Lifer
Mar 16, 2001
28,578
3
81


<< My first suggestion is try to get it to compile, this should be fairly easy just by messing around with the program. I also suggest taking out the 'std::' and as mentioned above, there needs to be a .h after iostream.

I've had Visual C++ and Borland 5. I like Borland better.
>>



I'm just using what the book i bought gave me.

which is a limited version of visual C++

I'm just trying to understand.. the basics.. and hopefully i can just start using different C++ Progs and compiliers
 

KeyserSoze

Diamond Member
Oct 11, 2000
6,048
1
81
I suck. I tried helping him, and couldn't get it.


EDIT: Hey, other programming people, would it help if he put a "getch" (which just basically waits for a user to press a button before ending the program. ) And should he choose Win32 Console Application for something like this, right?



KeyserSoze