#include <iostream>
#include <stdlib.h>
#include <string.h>
using namespace std;
int main()
{
string buf;
cout<<"Enter a string: ";
getline(cin,buf);
system("pause");
}
In dev-c++ this would compile fine but visual c++ tell me getline() is undefined... I googled and found nothing, and I'm not talking about cin.getline(), I'm talking about getline(cin,buffer), any clue?
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum