to delcare an object with pointer -
MyCar * mycar = new MyCar;
mycar->Create();
========================
to delcare an object without pointer -
MyCar mycar = new MyCar;
mycar.Create();
========================
for pointer we use ->
for non-pointer we use . (dot)
========================
I think for Java equivalent the -> is same as Java's . (dot)
========================
should I always you the MyCar * mycar = new MyCar; to initalize a new
Object?
since using -> is same as using (dot) in Java.
========================
when are the time to use the (dot) but not -> (non-pointer) then?
MyCar * mycar = new MyCar;
mycar->Create();
========================
to delcare an object without pointer -
MyCar mycar = new MyCar;
mycar.Create();
========================
for pointer we use ->
for non-pointer we use . (dot)
========================
I think for Java equivalent the -> is same as Java's . (dot)
========================
should I always you the MyCar * mycar = new MyCar; to initalize a new
Object?
since using -> is same as using (dot) in Java.
========================
when are the time to use the (dot) but not -> (non-pointer) then?