Cześć,
ostatnio natrafiłem na błąd dlaczego coś takiego działa
int _tmain(int argc, _TCHAR* argv[])
{
cout << "Tekst do wyświetlenia";
getch();
return 0;
}
a jak chcę wyświetlić tekst za pomocą funkcji to niedziała
string DisplayText(string text){
string tmp_text = text;
cout << tmp_text;
}
int _tmain(int argc, _TCHAR* argv[])
{
DisplayText("Text");
getch();
return 0;
}
i do linii z "cout << tmp_text;" mam komunikat
[bcc32 Error] test.cpp(26): E2094 'operator<<' not implemented in type 'ostream' for arguments of type 'string'
Full parser context
function2_console.cpp(24): parsing: string DisplayText(string)