крайне простой код, почему выдает ошибку; error: reference to non-static member function must be called; did you mean to call it with no arguments? if (name.length) != 0) #include <iostream> #include <string>
using namespace std;
int main(int argc, const char * argv[]) {
string name; cout << "Enter your name: "; getline(cin, name); if (name.length) != 0) cout << "Your name is" << name; else cout <<"Error";
if (name.length) != 0)
#include <iostream>
#include <string>
using namespace std;
int main(int argc, const char * argv[]) {
string name;
cout << "Enter your name: ";
getline(cin, name);
if (name.length) != 0)
cout << "Your name is" << name;
else
cout <<"Error";
cin.get();
return 0;
}