Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating object of class problem

 
shishir dwivedi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
let there be a class CA

class CA
{
public :
void fun()
{
//do something
}
};

int main()
{
CA obj;
obj.fun();
// CA *obj=new CA();
obj->fun();
}






what is the difference between creating CA obj then calling function and creating CA obj=new CA then calling function?
what implication can this code can do in project ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic