How to return a struct from a function in C++?

You have a scope problem. Define the struct before the function, not inside it.

Leave a Comment