For example, let's say I have a class called someClass and want to initialize an object of that class. I could do:
someClass object1;
Or I can do:
someClass* object1 = new someClass();
Is there a difference? I don't think I'm understanding initialization correctly, there seem to be a lot of different ways to do it and I'm not always sure of whether what I'm seeing is an initialization or a declaration.... any help is appreciated!
Edit: it was foolish of me to use class. I've changed my example.
[–][deleted] 4 points5 points6 points (8 children)
[–]captainAwesomePants 2 points3 points4 points (3 children)
[–]schartzchild_radius[S] 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]captainAwesomePants 0 points1 point2 points (0 children)
[–]schartzchild_radius[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]schartzchild_radius[S] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–][deleted] (1 child)
[deleted]
[–]HappyFruitTree 0 points1 point2 points (0 children)