Mar 13, 2006 #1 M manifolds Newbie level 5 Joined Jul 7, 2005 Messages 10 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,358 C++ xperts, help me!! whom it may concern i hv a set of points in x-y coordinates (2,3), (4,5), (9,0), (8,7)......lots of them actually. and i want to assign p[1]=(2,3) p[2]=(4,5) and so on..means i will hv for(i=0,i<=N,i++) p=(x.y) well, something like that.. how to do that? how to make it understand that, that is a coordinate system. is it something to do with command CPoint? or Struct or something? huhuhu..:?:
C++ xperts, help me!! whom it may concern i hv a set of points in x-y coordinates (2,3), (4,5), (9,0), (8,7)......lots of them actually. and i want to assign p[1]=(2,3) p[2]=(4,5) and so on..means i will hv for(i=0,i<=N,i++) p=(x.y) well, something like that.. how to do that? how to make it understand that, that is a coordinate system. is it something to do with command CPoint? or Struct or something? huhuhu..:?:
Mar 13, 2006 #2 V visioneer Full Member level 1 Joined Jan 6, 2002 Messages 98 Helped 1 Reputation 2 Reaction score 0 Trophy points 1,286 Activity points 1,072 Re: C++ xperts, help me!! manifolds said: whom it may concern i hv a set of points in x-y coordinates (2,3), (4,5), (9,0), (8,7)......lots of them actually. and i want to assign p[1]=(2,3) p[2]=(4,5) and so on..means i will hv for(i=0,i<=N,i++) p=(x.y) well, something like that.. how to do that? how to make it understand that, that is a coordinate system. is it something to do with command CPoint? or Struct or something? huhuhu..:?: Click to expand... There are a lot of method to solve your problem One very simple soulution here typedef struct { int/double x, y ; } Point ; Point p = new[1000] ; for( int i=o; i<N; i+ ) { p.x = x ; p.y = y ; }
Re: C++ xperts, help me!! manifolds said: whom it may concern i hv a set of points in x-y coordinates (2,3), (4,5), (9,0), (8,7)......lots of them actually. and i want to assign p[1]=(2,3) p[2]=(4,5) and so on..means i will hv for(i=0,i<=N,i++) p=(x.y) well, something like that.. how to do that? how to make it understand that, that is a coordinate system. is it something to do with command CPoint? or Struct or something? huhuhu..:?: Click to expand... There are a lot of method to solve your problem One very simple soulution here typedef struct { int/double x, y ; } Point ; Point p = new[1000] ; for( int i=o; i<N; i+ ) { p.x = x ; p.y = y ; }
Mar 13, 2006 #3 M manifolds Newbie level 5 Joined Jul 7, 2005 Messages 10 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,358 Re: C++ xperts, help me!! visioneer said: manifolds said: whom it may concern i hv a set of points in x-y coordinates (2,3), (4,5), (9,0), (8,7)......lots of them actually. and i want to assign p[1]=(2,3) p[2]=(4,5) and so on..means i will hv for(i=0,i<=N,i++) p=(x.y) well, something like that.. how to do that? how to make it understand that, that is a coordinate system. is it something to do with command CPoint? or Struct or something? huhuhu..:?: Click to expand... There are a lot of method to solve your problem One very simple soulution here typedef struct { int/double x, y ; } Point ; Point p = new[1000] ; for( int i=o; i<N; i+ ) { p.x = x ; p.y = y ; } Click to expand... so before that i should hv: int x={2,4,5...}; int y={3,5,6,7..}; is it?
Re: C++ xperts, help me!! visioneer said: manifolds said: whom it may concern i hv a set of points in x-y coordinates (2,3), (4,5), (9,0), (8,7)......lots of them actually. and i want to assign p[1]=(2,3) p[2]=(4,5) and so on..means i will hv for(i=0,i<=N,i++) p=(x.y) well, something like that.. how to do that? how to make it understand that, that is a coordinate system. is it something to do with command CPoint? or Struct or something? huhuhu..:?: Click to expand... There are a lot of method to solve your problem One very simple soulution here typedef struct { int/double x, y ; } Point ; Point p = new[1000] ; for( int i=o; i<N; i+ ) { p.x = x ; p.y = y ; } Click to expand... so before that i should hv: int x={2,4,5...}; int y={3,5,6,7..}; is it?
Mar 15, 2006 #4 C cfant Full Member level 3 Joined Apr 4, 2001 Messages 187 Helped 25 Reputation 50 Reaction score 6 Trophy points 1,298 Location California, USA Activity points 1,153 Re: C++ xperts, help me!! No, your sintax is incorrect.
Mar 16, 2006 #5 M manifolds Newbie level 5 Joined Jul 7, 2005 Messages 10 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,358 Re: C++ xperts, help me!! cfant said: No, your sintax is incorrect. Click to expand... care to correct me? another thing is: how to convert from screen coordinate to cartesian coordinate in MFC window? haiyyyyaaa:?::?:
Re: C++ xperts, help me!! cfant said: No, your sintax is incorrect. Click to expand... care to correct me? another thing is: how to convert from screen coordinate to cartesian coordinate in MFC window? haiyyyyaaa:?::?: