I am wwondering when is best practice to use pointer.
class Pen{
....
};
int main(int argc, char *argv[]){
Pen myPen;
Pen *myPen = new Pen;
}
These are 2 ways to create myPen object. But what's the main diff between them? When to use it as pointer and when not?
Thanks.
Rgds
Ryan