Let's say I am trying to define a class, and letting default constructor to initialise it's value. The result of initialized variable is (using type int) -858993460> Why is it so?
At the moment nobody initializes the var amzius. The compiler will create a default constructor for you but it doesn't know anything about your vars.
The best is to create a constructor yourself like:
1 2 3 4 5 6 7 8 9 10
class darbuotojas
{
public:
darbuotojas(int a) { amzius = a;}
// and/or
darbuotojas() { amzius = 0; // or any other value}
// allyour code here
};
BTW. What does darbuotojas mean? What language is it?