error: expected primary-expression before '.' token

An extremely over-simplified view is that a Class is like blueprints for building a house -- necessary to have, but you can’t live in it.

An Object is a house built from those plans -- now you can move in. And, you can build multiple, independent, houses from those plans.

Now, try Googling “Object Oriented Programming”.