i made a test program, this line " *ps.Working_Hours=10;" generates mistake.
why ?
#include <cstdlib>
#include <iostream>
using namespace std;
class Salary
{
public:
int Working_Hours;
float hour_rate;
float x;
};
int main(int argc, char *argv[])
{
Salary s;
float yy;
s.Working_Hours=7;
s.hour_rate=30.5;
Salary* ps;
ps=&s;
*ps.Working_Hours=10;
cout << "s.hour_rate=" <<s.hour_rate<<"\n"<<"ps->s.hour_rate"<<ps->Working_Hours<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}