Jun 22, 2011 at 12:12pm UTC
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
Jun 22, 2011 at 12:13pm UTC
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
Jun 22, 2011 at 12:24pm UTC
Ok, then I dont know what is the problem, but I can have a private declaration of a struct instance into my .h file ?????
Jun 22, 2011 at 12:51pm UTC
You can only declare things to be private inside a struct or class.
What exactly is it that you want to do?