Hi Gurus,
I know i am doing something hopelessly stupid here. Please Help me find it.

All i want to do in following code is , to  Convert a
char* (i.e. queryElem.sFieldData ) to and int(i.e.  iIntegerData ), and then
keep that int
as a UInt* in byFieldData variable.

int iIntegerData = 0 ;

// this line works perfect, I get the integer value
iIntegerData = StrAToI(queryElem.sFieldData ) ;

byFieldData  = new UInt8 [sizeof( int )] ;  // Allocation for byFieldData

MemSet( byFieldData, sizeof( int ) , 0 );  // Clear the memory of
byFieldData

// Copying the value to the Uint,
MemMove(byFieldData , &iIntegerData , sizeof( int ) ) ;

What i observe here is: if the iIntegerData >= 255 , there is no problem, i
can see the value stored in byFieldData as the value that i need. but if
iIntegerData <= 255 , I Get blank in the byFieldData after I do MemMove.
Please Help.

Ritesh




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to