By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,604 Members | 858 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,604 IT Pros & Developers. It's quick & easy.

Could you explain?

100+
P: 158
I have this little bit of code i need some one who knows something about the C language to tell me what it means.

Expand|Select|Wrap|Line Numbers
  1. ArtNetSendPacket("2.255.255.255", (char *)&ArtDmxTx, length($T_ArtDmx));
I think it means that the command ArtNetSendPacket which is defined in a C header file, the IP address for that command but i dont under stand the next part (char *)... that it checks the length of T_ArtDmx
Jun 13 '07 #1
Share this Question
Share on Google+
1 Reply


DeMan
100+
P: 1,806
It takes the address of the value ArtDmxTX (that is it gets a pointer to it) and casts it to a pointer to a character.

I think the idea in this case, is to ignore the type of objects and treat it as raw bytes, so that it can be sent
Jun 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.