Quote:
Originally Posted by Rafael Vasquez
This is a .cpp file. I don't like adding context to questions like these because I am really after more general answers.
|
Ok, but it's clearly being compiled as C code, and that's why more context would have been helpful.
In your original post, you wrote...
Quote:
I am having some issues with structure handling. The error I'm getting reads:
expected initializer before 'function_name'
|
In this case, the simple answer is, if the code you posted was compiled as C++, you wouldn't get any such error because 'my_struct' becomes implicitly typedef'd.
Which means, IMHO, you are using a C compiler to teach C++ to others.
