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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -