as you can see in the picture
this happens the second i add to that kamapatchi class 1 more integer.

#pragma once
#include "Configuration.h"

class Kamapatchi{
public: 
	Kamapatchi();
	Kamapatchi(Point );
	Kamapatchi(int,int);
	int getAge();
	bool isAlive();

	void drawSprite(char world[][BOARD_SIZE]);
	void eraseSprite(char world[][BOARD_SIZE]);
	void act(char world[][BOARD_SIZE]);
	void updateStatus();
	string getStatusString();
	string getSpecificMenu();
	void handleUserChoice(int);

	//sets and gets - 
	void setPoint(Point pCenter);
	Point getPoint();
	void setLife(int);
	void setHunger(int);
	int getHunger();


private:

	int randomizer(int,int);
	void reset(int,int ,int);

	bool checkPoint(int,int,int);
	void setX(int);
	void setY(int);

	void setHungerEndOfTurn(int);
	void setAge(int);
	void setIsAlive();
	void setExploded();
	void updateSize(bool);
	void setSize(int);
	void setWantMiddle(bool);
				
	bool getWantMiddle();
	int getOldSize();
	int getSize();
	int getX();
	int getY();
	int getLife();
	bool getExploded();

	Point _center;
	int _age;
	int _life;
     .
     .
     .

};

adding this

int holycow;

will cuz the following as in the picture

NO IDEA why is that happening.
i tried to debug the program using visual studio
and it just says stack corruption and when i check the kamapachi class i made
and its values the holycow integer isnt there

edit: after 3 hours... and changing a space in the main file...
compiled again.... and it works fine..... thanks alot visual studio for being too
lazy to compile main if it hasnt changed

hope this would help other noobs like me

So if it's solved, mark the thread solved!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.