Home > DeveloperSection > Forums > How to call a function in c ?
Dag Hammarskjold
Dag Hammarskjold

Total Post:24

Points:168
Posted on    June-13-2013 7:22 AM

 Visual C++ Visual C++ 
Ratings:


 1 Reply(s)
 687  View(s)
Rate this:
Hi All,

I'm new in C++ language, so there are some problem. Basically I have created one function in C++ successfully but how and where write line of code for calling that function. Please provide useful line of code.

Thanks in advance.   


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-14-2013 2:02 AM

try as following:

class myclass{
public:
show( );
};
myclass:: show( )
{
cout<<"In function\n";
}
int main( )
{
myclass obj;
obj.show( );
}

Don't want to miss updates? Please click the below button!

Follow MindStick