我使用getline()
遇到问题。
我尝试了许多示例并阅读了其他解决方案,但这没有解决我的问题。我仍然看到信息:'getline: identifier not found'
。
我已经包含了<stdio.h>
、<tchar.h>
、<iostream>
、<conio.h>
、<stdlib.h>
和<fstream>
,但仍然无法解决问题。
#include "stdafx.h"
using namespace std;
int main(int argc, _TCHAR* argv[])
{
string line;
getline(cin, line);
cout << "You entered: " << line << endl;
}
我现在需要做什么?
我使用的是 Windows 7 64 位和 Visual Studio 2013。
std::getline
函数的文件名。 - WhozCraig