can't access constructor vars

rc\main.cpp:16:10: error: 'class A' has no member named 'p' (a.p).If I create object and access its member(a.z) then program runs with no errors. The difference is that if I create object and accessed any members being initialized, it throws an error " member.." above. What could be wrong about this?

I'm sorry for the unformatted post the code parameters were not working.


using namespace std;

int main()

A a;

return 0;



#ifndef START_IT_H_
#define START_IT_H_

class A


int x = 45;
int z = 67;

int o = 58;
int p = 67;
int q = 130;
int z = 200;
~A(){}; //destructor*/


#include <iostream>
#include "start_it.h"

#endif /* START_IT_H_ */
Registered users can post here. Sign in or register to post.