Mail.ruПочтаМой МирОдноклассникиВКонтактеИгрыЗнакомстваНовостиКалендарьОблакоЗаметкиВсе проекты

Программирование на с++

Данила Терентьев Ученик (43), закрыт 2 года назад
крайне простой код, почему выдает ошибку; 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";


cin.get();
return 0;
}
Лучший ответ
Остальные ответы
Похожие вопросы