How to use a sruct written into another file in my .h ??

I have the #include "my_file.h" where I have a struct.
Ok, I can't use it into my main.h file, only at cpp file ????
Why ? Any way to fix this problem ?
Thanks
You can #include "my_file.h" anywhere you like.

When you #include a file, all that happens is the contents of that file gets copied exactly where you put the #include .

You can use it in main.h
Ok, then I dont know what is the problem, but I can have a private declaration of a struct instance into my .h file ?????
You can only declare things to be private inside a struct or class.

What exactly is it that you want to do?
Topic archived. No new replies allowed.