Hi all,
I am using Visual Studio 2005, and developing some application. Currently i am facing one problem. I have written a class and declared some member variables in the class. In the constructor i am initializing the member variables to 0(member variable is int). But when i debugged the code i found that the variable is not getting initialized. It takes the garbage value and even though we assign 0 it is not getting changed.
class :-
class foo
{
public:
foo() {i = 0;}
int get() {return i;}
private:
int i;
};
Can you please suggest why it is happening.