I am new to C++.While working with class and object I tried this code:
#include <bits/stdc++.h>
using namespace std;
class patient {
string name;
int age;
int room;
};
int main()
{
patient me;
me.name = "Zuahir";
me.age = 16;
me.room = 365;
cout << me.name;
return 0;
}
But this gives me a member inaccessible
error.
Kindly help me in this case