Monday, May 24, 2010

How to convert byte into string in c language?

i m having pointer so structure which members are of BYTE type.........i want to convert them into string(to print vendor name) and into number(to print serial number).....how to do it...i m using vc++........

How to convert byte into string in c language?
Byte is equivelant to unsigned char in C++ with values (in binary) from 0000 0000 to 1111 1111. To convery byte into a string you would end up with a single unsigned char (simply by typecasting it). Not the ideal way to do this.
Reply:I don't understand what you mean. Is each letter a character type? Do you need to transfer that into one string? Or is it an array of bytes?


No comments:

Post a Comment