//this gives initialisation error;
of course it does. you haven't actually created an instance of an object of type class1. you created a pointer to an object, and they you didn't point it to anything.
try this:
class1 temp;
temp.variable.x;
or this:
class1 *temp = new class1;
temp->variable.x;