In my C++ application I have the definition:
struct socksddr_storage ss;
struct sockaddr *sa;
what is the different between the following:
sa = (struct sockaddr *)&ss;
and
sa = (sockaddr *)&ss;
???
Any help?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no difference in C++ as the
structkeyword is optional. In C, the second form is not legal.