Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

help a new programmer

Initiate Mage
Joined
Apr 18, 2018
Messages
2
Reaction score
0
hello
im new in programing and i need some help
when i see source of some game i see some code new at me
like :
Code:
            WFIFOHEAD(RFIFOW(fd,2),8);
            WFIFOB(RFIFOW(fd, 2), 0) = '\xAA';
            WFIFOB(RFIFOW(fd, 2), 1) = '\x00';
            WFIFOB(RFIFOW(fd, 2), 2) = '\x05';
            WFIFOB(RFIFOW(fd, 2), 3) = '\x02';
            WFIFOB(RFIFOW(fd, 2), 4) = '\x17';
            WFIFOB(RFIFOW(fd, 2), 5) = '\x00';
            WFIFOB(RFIFOW(fd, 2), 6) = '\x00';
            WFIFOB(RFIFOW(fd, 2), 7) = '\x00';

the xaa and x00 and other code what he means or how he work
when i see that i filing like a idiot because is new for me
plz i need some help
 
◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜
Developer
Joined
May 29, 2007
Messages
2,167
Reaction score
898
This is a hex value, a value written in hexadecimal.

the \x seems to escape the hexadecimal value in the language.

 
Initiate Mage
Joined
Apr 18, 2018
Messages
2
Reaction score
0
This is a hex value, a value written in hexadecimal.

the \x seems to escape the hexadecimal value in the language.


yeah i know but why use that type why dant use directely the value in Decimal
like
int k='5887 ';
if(k=16ff){
cout<<"yeah"<<endl;
}
why ??
 
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
yeah i know but why use that type why dant use directely the value in Decimal
like

why ??

That's impossible to answer with the amount of the source provided. From first sight it doesn't look to be used for string composition.
 
Back
Top