class in class

I wrote a class named x in an other class' public named y. And i want to use something like that in main;
x data
But i can't solve how can i do that.
use y::x outside y
- x has to be public -
yeap i solved with writing;
y::x data;
in main
Topic archived. No new replies allowed.