-1
想知道错误是什么..>>操作上ifstream的
C:lab1a.cpp(16):错误C2678:二进制 '>>':没有运营商发现其采用的左手操作输入“的std :: ifstream的”(或没有可接受的转化率)
#include "StdAfx.h" // precompiled
#include <iostream>
#include <fstream>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>
using namespace std;
// No checking of end of stream etc.
void getw(string& t, ifstream& in)
{
in >> t;
}
您已经为您显示的内容添加了大量额外的标题,但没有包含您正在使用的标题。 – chris
在这里编译没有窥视。虽然@chris有一个问题。 ''缺少。 –
>>必须超载! –