Dear all,
This platform is helping a lot in learning linux. And I wanna say thanks to all for this.
Today when i was compiling a .cpp file using gcc or g++ command i got an error shown below:
sph_r.cpp:1:22: error: iostream.h: No such file or directory
sph_r.cpp:2:21: error: fstream.h: No such file or directory
sph_r.cpp:4:21: error: iomanip.h: No such file or directory
sph_r.cpp: In function ‘int main()’:
--
LUG@IITD - http://tinyurl.com/ycueutm
hi
it would be great if u post ur code.so that debigging becomes easy...pls attach ur code...
From the code copy pasted from that link:
4: In C++, you don't want to use header files for C (ones ending with
.h).. If you really want to use stdlib in C++, you should include
"cstdlib" (#include <cstdlib>)
5: get rid of iomanip.h
6: hence, "math" becomes "cmath"
If you look at the manpage of random() (you will need manpages-dev on
Ubuntu for it, then type "man 3 random"), you will find the syntax for
random function.
" long int random(void);
void srandom(unsigned int seed);"
Read the man page for more details. I think you will be done porting
your code once you make these fixes.
Sharad