Tom Russell

Combining strings in CodeWarrior for the MC68HC812

Discussion created by Tom Russell on Feb 24, 2009
Latest reply on Feb 25, 2009 by bigmac

Hi,

 

I'm a student doing a microprocessors segment on my degree at Coventry University and we've been given an assignment for the above processor (exact # is MC68HC812A4) - you'll have to bear with me a bit because this is the first time i've done anything along these lines :smileyhappy:

 

We're producing a simple program in C++ and as part of it i'd like to do some string operations

 

i.e.

 

char item1[3] = "0x0";

char item2[1] = "F";

char result;

 

strcat(result,item1);

strcat(result,item2);

 

Led_Port=result;

 

I've attempted to #include <string.h> at the top of the file, but when i go into the true-time debugger and attempt to run this code segment, the debugger halts at the strcat operation and the 'code' window says 'STRING.C NOT FOUND'.

 

Can anyone help? I'm probably making some kind of schoolboy error - or rather student error!

 

Thanks in advance.

Outcomes