aspose file tools*
The moose likes C / C++ and the fly likes Creating object of class problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "Creating object of class problem" Watch "Creating object of class problem" New topic
Author

Creating object of class problem

shishir dwivedi
Greenhorn

Joined: Jun 04, 2012
Posts: 9
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 ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating object of class problem