| ??? 09/25/03 15:32 Read: times |
#55472 - RE: mixed vartype buffer in C Responding to: ???'s previous message |
You could try use of a simple type cast. Following your example you can simply use....
char xdata buff[25]; sprintf(buff,"%u",(unsigned int *)&abBuf[3][1]); Of course this example does presume that the layout of the variables within your buffer are such that they are in contiguous bytes. The above would not work if the two bytes of the variable were in abBuf[3][1] and abBuf[4][1]. Michael Karas |
| Topic | Author | Date |
| mixed vartype buffer in C | 01/01/70 00:00 | |
| RE: mixed vartype buffer in C | 01/01/70 00:00 | |
| RE: mixed vartype buffer in C | 01/01/70 00:00 | |
| RE: mixed vartype buffer in C | 01/01/70 00:00 | |
| RE: mixed vartype buffer in C | 01/01/70 00:00 | |
| RE: mixed vartype buffer in C | 01/01/70 00:00 | |
| RE: mixed vartype buffer in C | 01/01/70 00:00 | |
RE: mixed vartype buffer in C | 01/01/70 00:00 |



