Hi
I have a problem assigning a single character into a pointer and an array larger than 1 - I think I know why this is but I am unsure about how to overcome it...
Any help much appreciated!Code:char TempChar[3] char SinChar[1]; // At any time StoreChar could contain 1 to 3 characters // - I want whatever characters are stored in it to be assigned //to *data - I think the interger cast causes problems but it is //necessary - how can I convert TempChar to int without messing //up the data? *data= int(TempChar); //Later on I wish to concatenate SinChar (a single char // array) to TempChar - this seems to work but always has // nonsense characters as well - I think this is due to a single //character being concatenated to a array which could contain //either 1 or 2 characters - how can I do this without the //nonsense characters? strcat(TempChar, SinCheck);
Jimbo