PDA

View Full Version : c++ help


jon_z
January 29th, 2006, 07:39 PM
jon@Electra:~$ gcc -c helllo.C
In file included from /usr/include/c++/4.0.2/backward/iostream.h:31,
from helllo.C:1:
/usr/include/c++/4.0.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.


just wondering what i can do to fulfil the missing .h files...ive tried numerous packages.

Adrian
January 29th, 2006, 07:43 PM
just wondering what i can do to fulfil the missing .h files...ive tried numerous packages.

Have you tried
#include <iostream>
?

jon_z
January 29th, 2006, 08:03 PM
no go

Adrian
January 29th, 2006, 08:09 PM
no go

Well, that should work. I'm out of ideas already :)

jerome bettis
January 29th, 2006, 09:49 PM
iostream is a c++ thing and you're writing a C file & using a C compiler.

#include <stdio.h>

int main(int argc, char* argv[]) {
printf("Hello World!\n");
return 0;
}

Adrian
January 29th, 2006, 10:02 PM
iostream is a c++ thing and you're writing a C file & using a C compiler.

True, I didn't notice the use of gcc.

Since the topic says C++ help, I assume that the intention is the write a C++ program. Then g++ must be used for compiling instead of gcc.

jon_z
January 30th, 2006, 01:38 AM
thank you very very much, solved the problem :-) simple error by me