| tnjgraham (10) | |
|
Hello, I am working on this project where I am receiveing a char array and need to concatenate elements and store the combined element in a short array. For Example: I have a char array with the following elements:FF,78,98,45,67,12,23,45,65,78 and I want the short array to have the following elements:FF78,9845,6712,2345,6578. I have tried strcat() but it didn't work. Any help/advice will be greatly appreciated. Thanks In Advance | |
|
|
|
| vlad from moscow (3112) | |||
|
The result depends on whether your system uses big endian or little endian. But in any case you can try at first a simple copying
I forgot to mention that it can be correct provided that sizeof( short ) == 2.:) | |||
|
Last edited on
|
|||