...

View Full Version : C++ hello world



ghell
10-26-2004, 12:25 PM
everywhere i look it tells me to use


#include <isostream>
using namespace std;

int main()
{
cout << "Hello World\n";
return 0;
}


but when i compile this with boarland c++ compiler, mingw or devc++ they all throwthe following errors (albeit worded slightly differently each time)


Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
hello.cpp:
Error E2209 hello.cpp 1: Unable to open include file 'isostream'
Error E2282 hello.cpp 2: Namespace name expected
Error E2451 hello.cpp 6: Undefined symbol 'cout' in function main()
*** 3 errors in Compile ***

this is the simplest script u can do so how am i getting 3 errors (and how do i fix them)

Brandoe85
10-26-2004, 02:39 PM
I always thought this line:


#include <isostream>

should be


#include <iostream>

trib4lmaniac
10-26-2004, 03:08 PM
I always thought this line:


#include <isostream>

should be


#include <iostream>

You would be correct.

ghell
10-26-2004, 03:17 PM
i always thought

You would be correct.

should be

usefulbut apparently i was wrong

-----
thanks, Brandoe85, i just looked at another example in my book and worked out that the 1st 1 had a typo in it but maby you could have said this in a less condescending way than "i always thought ..typo.. shud be... real spelling")

this whole "Computer Programming" forum better not be like you two

trib4lmaniac
10-26-2004, 03:27 PM
this whole "Computer Programming" forum better not be like you two
Lol, I am unique - just like everybody else :p

Brandoe85
10-26-2004, 05:57 PM
thanks, Brandoe85, i just looked at another example in my book and worked out that the 1st 1 had a typo in it but maby you could have said this in a less condescending way than "i always thought ..typo.. shud be... real spelling")

this whole "Computer Programming" forum better not be like you two
:confused:I did not mean it that way, my bad :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum