Yeah thanks thats all good to know. I don't have any example that I can paste, but I do use sprintf and so generally I would do something like:
#include "DarkGDK.h"
void DarkGDK ( void )
{
int MyVar = 100;
char Info[256];
while ( LoopGDK ( ) )
{
sprintf(Info,"%d",MyVar);
dbText(10,10,Info);
dbSync ( );
}
return;
}
This would work great, up to a certain point, when there are a lot more things in memory, then I get an Overrun. As soon as I change it to char* Info = new char[256]; the I no longer get the overrun message. But you reckon it is still corrupting something somewhere?
I just saw that in a lot of examples people declare their chars as char* Info, or char* Info[256], even when used as a paramater. Im trying to understand it so that I can know how to manage my code better, memory wise.
Thanks