Mailinglist Archive: opensuse (3637 mails)

< Previous Next >
Re: [SLE] gcc won't compile hello world
  • From: Jim Sabatke <jsabatke@xxxxxxxxxx>
  • Date: Mon, 28 May 2001 20:47:57 -0500
  • Message-id: <3B12FFCD.5070107@xxxxxxxxxx>
Thanks for the help. I must have some incompatibility in my system as I have the same gcc version.

Steven Hatfield wrote:

ashari@lancelot:~ > cat test.cpp
#include <iostream>

int main() {

cout << "Hello world\n";

}
ashari@lancelot:~ > g++ test.cpp -o test
ashari@lancelot:~ > ./test
Hello world
ashari@lancelot:~ > rpm -q gcc
gcc-2.95.2-149


Looks fine...

-Steven

On Monday 28 May 2001 08:12 pm, EagleIce wrote:

On Tuesday 29 May 2001 01:51, Jim Sabatke wrote:

Hmmm, it doesn't work for me, (btw, I was using g++):

[snip]

I wonder what is different?

Now I've made some tests and these compile fine:
---
#include <iostream.h>
main()
{
cout <<"Hello C++!";
}
---
#include <iostream.h>
void main(void)
{
cout << "Hello, World!";
}
---
But this one:
---
#include <iostream>

int main() {

cout << "Hello world\n";

}
---
gives me this:
parse error before character 0240

Cheers,

ei



--
Jim Sabatke
SuSE 7.1 Linux
Kernel - 2.4.0
http://www.execpc.com/~jsabatke

It's all a matter of brain cells. You see every drink of liquor you take kills a thousand brain cells. But that doesn't much matter cause we got billions more. Now, first the sadness cells die, so you smile real big; And then the quiet cells go so you just say everything real loud for no reason at all. But that's OK because then the stupid cells go next, so everything you say is real smart. And finally come the memory cells; they's tough sons-o-bitches to kill - The Legend of Bagger Vance






< Previous Next >
Follow Ups