これはなぜ動作しないのか分かりません。それが助け場合、私は、Visual Studio2010 C++ ExpressでこれをやっているCinにオペランドがありません>>
error C2678: binary '>>' : no operator found which takes a left-hand operand of type 'std::istream' (or there is no acceptable conversion)
:何らかの理由で私はエラーを取得しています。わからない、なぜその私がcin
を使用して他のプログラムを行ってきた。このエラーを...渡す
マイコード:
あなたは、その関数が定義されている場所である、<string>
を含めるのを忘れて
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
int main(int argc, char* argv){
string file;
if (argc > 1)
{
file = argv[1];
}
else
{
cout << "Please Enter Your Filename: ";
cin >> file;
}
}
'#include ' –