Hata mesajlarını okumanı tavsiye ediyorum.
Class isminin sonundaki nokta nedir öyle? Sil onu.
C++:
#include <iostream>
#include <string>
using namespace std;
class Employee
{
private:
string name;
public:
void isimkoy(string isim){
name = isim;}
string isimyaz()
{ return name; }
};
int main()
{
Employee *employee = new Employee();
employee->isimkoy("Alper");
cout << employee->isimyaz();
return 0;
}
Sildikten sonra hata almaman gerek. Dene bakalım.