If the function is:
void foo(struct* bar)
{
}
And
struct foobar;
Is a single instance of struct, will the call
foo(foobar);
Be treated as if it were a pointer to a one member array? Will the call be legal or does it require an overload?
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.
No, it will not. The call is not legal, and an overload could make the call work.
If a function needs a pointer to a
struct, then you have to give it a pointer to astruct. Arrays are special since they decay to a pointer to the first element.