You need to prepend the class names with the std
namespace ie. std::ifstream
Including fstream or ifstream in a C++ Header File
-
20-06-2023 - |
Pergunta
How does one go about defining methods in a header file that accept either an fstream or ifstream as a 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);
};
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow