Welcome! Log In Create A New Profile

Advanced

Casting a char to a u8 var

Posted by SteelSLasher 
Casting a char to a u8 var
October 23, 2009 08:37PM
I got back to work on the wiixplore project and there seems to be a problem with some http parsing

in summary, i need to be able to convert the char output from
char * tcp_readln (const s32 s, const u16 max_length, const u64 start_time, const u16 timeout);

into u8
u8 *http_data;
Re: Casting a char to a u8 var
October 23, 2009 08:45PM
u8 *http_data = (u8*)tcp_readln (const s32 s, const u16 max_length, const u64 start_time, const u16 timeout);

?? That what you want ?
Re: Casting a char to a u8 var
October 24, 2009 11:31AM
yeah thats probably what i want, u8 just seems like an odd var type (usigned int???)
Re: Casting a char to a u8 var
October 24, 2009 03:05PM
u8 is unsigned char.
Re: Casting a char to a u8 var
October 24, 2009 03:18PM
aaahhh, couldnt find any info via google so thanks that little nugget of knowledge
Re: Casting a char to a u8 var
October 24, 2009 06:04PM
Quote
SteelSLasher
aaahhh, couldnt find any info via google so thanks that little nugget of knowledge
Why did you look on Internet? Everything is in gctypes.h:
/*+----------------------------------------------------------------------------------------------+*/
typedef unsigned char u8;									///< 8bit unsigned integer
typedef unsigned short u16;								///< 16bit unsigned integer
typedef unsigned int u32;									///< 32bit unsigned integer
typedef unsigned long long u64;						///< 64bit unsigned integer
/*+----------------------------------------------------------------------------------------------+*/
typedef signed char s8;										///< 8bit signed integer
typedef signed short s16;									///< 16bit signed integer
typedef signed int s32;										///< 32bit signed integer
typedef signed long long s64;							///< 64bit signed integer
/*+----------------------------------------------------------------------------------------------+*/
And much more...
Sorry, only registered users may post in this forum.

Click here to login