Quote Originally Posted by Megidolaon
As you would in C# and it doesn't work. How would be the correct syntax?
new Object() gives you a pointer to an Object object that is value-initialised. As such, you would write:
Code:
Object* o = new Object();
You also need to use delete when you are done with o, e.g.,
Code:
delete o;
Quote Originally Posted by Megidolaon
And is it best to only use pointers to objects (which would mimic C#) so that you can't make the mistake of passing them by value?
No. To avoid passing them by value, make the parameters of the relevant functions take the objects by (const) reference. Of course, in some situations you actually want to pass objects by value, e.g., you want to work on a copy anyway.

Quote Originally Posted by Megidolaon
What I would want to do (and I'm used to in C#) is to put all code that is part of a class between the starting and ending brackets:
You can define member functions inline in the class definition if you wish, so the error is probably a typographical error or something else.

Quote Originally Posted by Megidolaon
Also, how do I make static methods (and classes)?
What did you try? There is no such thing as a static class in C++, as far as I know.