Click here to Skip to main content
15,917,320 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
CP Visitor12-Apr-05 4:44
CP Visitor12-Apr-05 4:44 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim12-Apr-05 9:16
Ganesh_Srim12-Apr-05 9:16 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Bob Helter12-Apr-05 10:11
sussBob Helter12-Apr-05 10:11 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim12-Apr-05 23:12
Ganesh_Srim12-Apr-05 23:12 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Blake Miller12-Apr-05 7:31
Blake Miller12-Apr-05 7:31 
GeneralRe: ForwardReferencing in VC++ 6.0 Pin
Ganesh_Srim12-Apr-05 9:10
Ganesh_Srim12-Apr-05 9:10 
GeneralRe: Tried All - NoLuck! Pin
Ganesh_Srim12-Apr-05 9:26
Ganesh_Srim12-Apr-05 9:26 
GeneralRe: Tried All - NoLuck! Pin
Rick York12-Apr-05 9:48
mveRick York12-Apr-05 9:48 
I made this little test program and it compiled and worked :

#include "stdafx.h"

class Point3D; // Forward Declaration of class Point3D defined below.

class Point2D
{
public:
    int i, j;
    Point2D()                { Set( 0, 0 ); }
    Point2D(int a, int b)    { Set( a, b ); }
    void Set( int a, int b ) { i = a; j = b; }
    __inline void projectFrom(Point3D *p3d);
};

class Point3D
{
public:
    int i, j, k;
    Point3D()                              { Set( 0, 0, 0 ); }
    Point3D(int a, int b, int c)           { Set( a, b, c ); }
    Point3D& operator=(const Point2D& p2d) { Set( p2d.i, p2d.j, 0 ); }
    void Set(int a, int b, int c)          { i = a; j = b; k = c; }
};


void Point2D::projectFrom(Point3D *p3d)
{
    i = p3d->i;
    j = p3d->j;
}


////////////////////////////////////////////////////


int main()
{
    Point2D p2d(1,2);
    Point3D p3d(2,3,4);
    p2d.projectFrom( &p3d );
    fprintf( stdout, "p2d = (%d, %d)\n", p2d.i, p2d.j );
    return 0;
}

GeneralRe: Tried All - NoLuck! Pin
CP Visitor12-Apr-05 22:55
CP Visitor12-Apr-05 22:55 
GeneralRe: Tried All - NoLuck! Pin
Ganesh_Srim12-Apr-05 23:17
Ganesh_Srim12-Apr-05 23:17 
GeneralRe: Tried All - NoLuck! Pin
Ganesh_Srim12-Apr-05 23:12
Ganesh_Srim12-Apr-05 23:12 
GeneralRe: ForwardReferencing in VC++ 6.0: Resolved! Thanks All Pin
Ganesh_Srim12-Apr-05 23:21
Ganesh_Srim12-Apr-05 23:21 
GeneralNotify Change Pin
sunit511-Apr-05 23:25
sunit511-Apr-05 23:25 
GeneralRe: Notify Change Pin
ThatsAlok11-Apr-05 23:45
ThatsAlok11-Apr-05 23:45 
GeneralRe: Notify Change Pin
sunit512-Apr-05 0:42
sunit512-Apr-05 0:42 
GeneralRe: Notify Change Pin
ThatsAlok12-Apr-05 0:52
ThatsAlok12-Apr-05 0:52 
GeneralRe: Notify Change Pin
sunit512-Apr-05 0:57
sunit512-Apr-05 0:57 
GeneralLONGLONG Pin
fardak11-Apr-05 22:07
fardak11-Apr-05 22:07 
GeneralRe: LONGLONG [Edited] Pin
Joel Holdsworth11-Apr-05 22:56
Joel Holdsworth11-Apr-05 22:56 
GeneralRe: LONGLONG Pin
fardak11-Apr-05 23:22
fardak11-Apr-05 23:22 
GeneralRe: LONGLONG Pin
toxcct11-Apr-05 23:27
toxcct11-Apr-05 23:27 
GeneralRe: LONGLONG Pin
Joel Holdsworth12-Apr-05 0:06
Joel Holdsworth12-Apr-05 0:06 
GeneralRe: LONGLONG [edited] Pin
toxcct11-Apr-05 23:08
toxcct11-Apr-05 23:08 
GeneralRe: LONGLONG Pin
fardak11-Apr-05 23:42
fardak11-Apr-05 23:42 
GeneralRe: LONGLONG Pin
toxcct11-Apr-05 23:47
toxcct11-Apr-05 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.