First off, you can't have a class named class. class is a reserved word.

Not sure what you mean by "connected to each other".
You have to create an instance of (instantiate) the class.

Let's rename your class to Foo to avoid the use of a reserved word.

1234567

int main ()
{ Foo a; // this is an instance of Foo// Its ctor will be called automatically to initialize it
a.somefunc(); // Call somefunc() which is a member of Foo. // somefunc() will operate on instance areturn 0; // Foo's dtor is called to cleanup instance a
}