|
From: Carlos d. M. <cg...@wo...> - 2002-09-03 18:55:43
|
I don't see the point. unsigned char is one byte, isn't it? Maximum is 25= 5. So what sense has compare a variable which max value is 255 with a number greater? I remember reading somewhere that unsigned char is one byte in all comput= ers. Abhijit Shylanath escribi=F3: > > Hi List, > > > > > > > > I have an unsigned char* with the value 12345678 (as int) and I need = to > > compare the first 4 numbers with another value (unsigned char). > > > > Does someone have an idea ??? > > Greets, Christian. > > Is this what you're looking for? > > int foo =3D 12345678; > unsigned char bar =3D 23; > while(foo > 255) > foo /=3D 10; > if(foo =3D=3D bar) > // whatever > > ___________________________________________________________ > > Abhijit Shylanath > > E-mail: mu...@gm... || ibr...@bi... > Web-site: http://mudeth.tripod.com/ > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |