Jun 10, 2012 #1 Y youstron Newbie level 6 Joined Mar 5, 2012 Messages 14 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,372 how to convert signed to unsigned integer using mikroC?
Jun 10, 2012 #2 alexan_e Administrator Joined Mar 16, 2008 Messages 11,888 Helped 2,021 Reputation 4,158 Reaction score 2,031 Trophy points 1,393 Location Greece Activity points 64,371 Is it a positive signed integer? If so then a simple typecasting would do the job Code: unsigned_var = (unsigned int)signed_var If it is a negative number then typecasting will give a wrong result. Alex
Is it a positive signed integer? If so then a simple typecasting would do the job Code: unsigned_var = (unsigned int)signed_var If it is a negative number then typecasting will give a wrong result. Alex