Including fstream or ifstream in a C++ Header File -


how 1 go defining methods in header file accept either fstream or ifstream paramater?

#include <fstream> #include <string>  class hw4 {          public:                 // methods                 char* cflagcheck(char* logfile, fstream& f);                 int sflagcheck(char* set, fstream& f, ifstream& cpy, int &r, int &x, int &y);                 void* runrobot(void* robotcount); }; 

you need prepend class names std namespace ie. std::ifstream


Comments

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -