Linking structs together March 18, 2009 03:47PM | Registered: 15 years ago Posts: 32 |
struct vector2f { public: vector2f () {} vector2f (float X, float Y) { x = X; y = Y; } vector2f& operator= (vector2f v) { ...
typedef struct CLocation { ... vector2f vert[width+1][height+1]; ...
Re: Linking structs together March 18, 2009 11:21PM | Registered: 16 years ago Posts: 73 |
Re: Linking structs together March 19, 2009 12:12AM | Registered: 15 years ago Posts: 32 |
Re: Linking structs together March 19, 2009 03:47AM | Registered: 16 years ago Posts: 73 |
Re: Linking structs together March 19, 2009 06:40AM | Registered: 15 years ago Posts: 703 |
Quote#include <header_with_vector2f.h> typedef struct CLocation { ... vector2f vert[width+1][height+1]; ...
Re: Linking structs together March 19, 2009 10:19AM | Registered: 15 years ago Posts: 25 |
vector2f vert[width+1][height+1];This needs to be allocated dynamically (if width and height aren't constants), doesn't it.?
#include <header_with_vector2f.h>
#include "header_with_vector2f.h"
Re: Linking structs together March 19, 2009 03:39PM | Registered: 16 years ago Posts: 73 |
Re: Linking structs together March 19, 2009 04:20PM | Registered: 15 years ago Posts: 32 |
Re: Linking structs together March 19, 2009 05:08PM | Registered: 15 years ago Posts: 32 |
#define maxLocationWidth 1024 #define maxLocationHeight 128 vector2f vert[maxLocationWidth+1][maxLocationHeight+1];Perhaps I'll allocate that when the level grows ;)