I would like to ask the following questions about pointer in C++.
I have writen a class called Draw and I call it in the following ways.
1. Draw *draw;
2. Draw *draw=new Draw;
What's the difference between the above 2? and are they all needed to be deleted after use? as method one is not created using new, so i guess it dun need to be deleted. Am I right?
Besides, for the following codes,
Are there two "10" values present in the system, i.e. one is ref and the other is number? or just one "10" value, i.e. both ref is pointing to number1?
Thanks a lot ^^