What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
I’m having trouble figuring why the output is different from what I had imagined.
I have two classes, one is the base class, and one is inherited from the base class. They both have different headers and cpp files. Sorry if this looks really messy, this would be my first time posting code here in the forums.
` SubClass::SubClass(int a)
return BaseClass::getNumber(); //where the base class getNumber() returns the integer variable number.
//in a different cpp file
number=a; //number is a private member of the base class.
cout<< Sub1.getNumber(); //this gives me -858993460 instead of 123.
Assuming I included the correct header files and such, why would this not give me 123? Thank you in advance.
That’s what I figured since I experimented by putting a cout\<\< number; in the BaseClass part (and it gave me 123). However, the end result still gave me the huge negative number. Glad to know how to get it working as intended.