When to use pointers?
I'm new to C++ and I'm kind of stumped on when I should use a pointer. Or if I should use a pointer to create a new object.
Like is this proper?:
ClassName* cname = new ClassName();
or is this proper?:
ClassName cname();
Or is there something else that's proper and both of them are wrong? Or are they both correct and it just "depends" when to use them... (which would make it even more confusing lol)
I come more from Java and some C# lol, So I'm probably doing things wrong... trying to bring some of the java / c# i know of in to c++.
Any advice about when to use pointers is greatly appreciated.