Code:
//reset your memory,make all is '\0'
memset(Agent.dna,'\0',5);

// BETTER
//reset your memory,make all is '\0'
memset(Agent.dna,0,sizeof(int) * 5); // does not need to be a character, also int is 4 byte in size



but if you use sys_malloc both of it isn't necessary because sys_malloc does this for you!


Visit my site: www.masterq32.de