This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating object of class problem

 
shishir dwivedi
Greenhorn
Posts: 9
  • 0
  • 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