Linking problem with string class
Hi Guys,
I am trying to write some code using the string class in C++ . Heres a segment of the code :- Code:
#include <stdio.h> Code:
[root@localhost project]# gcc -o checksum checksum.cpp Thnx Arvind |
you need to use g++ to compile c++ code.
g++ will then probably complain about depreciated header files, so you need to use #include <cstdio> #include <cstdlib> instead of stdio.h and cstdlib.h |
thnx a lot...will try this...but these errors started to come up only after I started to use the String class...
|
yea, the string class is a c++ header file. the other headers are c header files. I'm not sure, but i don't think the c compiler is aware of any of the c++ header files. anybody else know the details on what directories are in the default path that the compiler looks for header files?
|
hey thnx 4 replying ...I got it sorted out ...if you use :-
Code:
using namespace std; Arvind |
All times are GMT -5. The time now is 01:09 PM. |