I am trying to write header file. I can write simple headers like add(int x, y) return x+y; . But when I tried to get more complicated, visual studio gave error. I guess error is related to <fstream>
. It always shows
"error C2065: 'fstream' : undeclared identifier ".
First line of my cpp file is void get_int(fstream& stream, int offset)
(except #include<fstream>
) and first definiton of .h file is
#ifndef GET_H
#define GET_H
int get_int(fstream& stream, int offset);
#endif
It goes like this. What is wrong with this code?