I've been trying to fix a problem with getline() and cin.getline().Here's a example I've made and it still has the problem:
" No matching function to 'getline(std::istream&, char[100])' "
Here's the code:
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
int main()
{
char name[100];
cout << "\nEnter your name: ";
getline (cin, name);
cout << "\nYour name is: " << name;
Sleep (5000);
return 0;
}
I don't know why but I think I know how to fix it, except I can't see the problem...:@