Implicit instantiation of undefined template 'std::basic_ifstream<char,std::char_traits<char>>'
#ifndef MAPPER_H
#define MAPPER_H
#include <iostream>
#include <string>
#include <vector>
#include "KeyValue.h"
#include "Parser.h"
using namespace std;
class Mapper
{
public:
Mapper(ifstream& infile);
~Mapper(void);
void loadTokens();
void showTokens();
void map();
void printMap();
void printMap(string map_fileName);
private:
ifstream inFile; //<-- is where the error is happening
vector<string> tokens;
vector<KeyValue> map_output;
Parser* parser;
};
#endif
Run Code Online (Sandbox Code Playgroud)
我甚至尝试过推杆std::ifstream
但它仍然无效.
当我#include <fstream>
代替的#include <iostream>
,我在得到这些错误fstream.tcc
和basic_ios.tcc
:
'operator=' is a private member of 'std::basic_streambuf<char>' …