Re: reference vs pointer .. ?

From: m sergei (sergei_m_1_at_yahoo.com)
Date: 07/07/04

  • Next message: Cyde Weys: "Re: Converting VB6.0 external dll function call to Visual C++ .NET"
    Date: 6 Jul 2004 18:32:28 -0700
    
    

    say class is Test
    then
    Test *t=new Test();
    t->a=9; //to access a member of class Test

    how would the & reference work here (instead of *t that was used above)

    like Test &t = new Test() //gives compile error

    please give the correct usage with & (reference of object)


  • Next message: Cyde Weys: "Re: Converting VB6.0 external dll function call to Visual C++ .NET"