hay guys iam new to c++ programming studing for c++.com
iam getting to a point that i wirte a program and it doesn't run
and i can't find anything realted to it , to know where is the problem so
that's the program
// cin with strings
#include <iostream>
#include <string>
#include <conio>
using namespace std;
int main ()
{
string mystr;
cout << "What's your name? ";
getline (cin, mystr);
cout << "Hello " << mystr << ".\n";
cout << "What is your favorite team? ";
getline (cin, mystr);
cout << "I like " << mystr << " too!\n";
getch();
}
iam compiling with borland and
the error
Error: noname00.cpp(9,21):Could not find a match for 'std::getline(istream_withassign,std::basic_string<char,std::string_char_traits<char>,std::allocator<char>>)'
Error: noname00.cpp(12,21):Could not find a match for 'std::getline(istream_withassign,std::basic_string<char,std::string_char_traits<char>,std::allocator<char>>)'
so what's the porblem ...
thanks in advance .