Hi,
I have an EnemySprite object that has an int member variable called Chromosome. The value of it is "1".
I'm trying to write that value to a text file, but instead of getting "1" I am getting "1244044", which I presume is the RAM address of the variable.
I can't figure out why can't I get to the value of the variable.
Here is a little code example:
Any advice on this is really appreciated. Thanks.Code:void GA::StoreDeadEnemyInfo(Sprite* pEnemySprite) { ofstream f("Dead_Enemies.txt", ios::app); f << pEnemySprite->GetChromosome(); f << "_"; f << fitness; f << "\n"; }



LinkBack URL
About LinkBacks


