View Single Post
  #2 (permalink)  
Old April 7th, 2006, 02:24 AM
C@uark C@uark is offline
Authorized User
 
Join Date: Oct 2004
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to C@uark
Default

Not sure exactly what you are trying to acheive with your function, how ever you might do this

#include <iomanip>
#include <iostream>
using namespace std;

class myclass
{
public :
    int m,n;
    myclass(){m=10;n=12;}
}

void disp( myclass& obj )
{
    cout<<"Hello"<<endl
         <<obj.m;
    return;
}

void main()
{
    myclass myobjct();
    disp( myobjct );
    return;
}
Reply With Quote