Class problems

I have been having a problem with my code for quite a while now. It started with trying to reference a const static int of a class in the same class. It caused a strange problem which disallowed any class from reading any of its variables. Even after removing the new code, the problem persisted (and still does). I decided to change from consts to #define-ing all of my constants instead for the time being. But there is still a problem. In a class I call "Figure," the #define's aren't being read. Attached is the code. NOTE: The problem isn't the header file, it is read properly by other classes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "Definitions.h"

class Figure {
public:
	//Figure index
	struct FIGURE_TYPE {
		//Where to crop the image from
		SDL_Rect crop;
		int x;
		int y;
	};

	//The game figure
	FIGURE_TYPE figure_index[FIGURE_COUNT];

	//The figure array
	int figure_array[MAP_HEIGHT / 64][MAP_WIDTH / 64];

	//Functions
	Figure ( void );
	bool draw_figures ( SDL_Surface* screen, SDL_Surface* figures, SDL_Rect camera, Figure::FIGURE_TYPE figure_spec[FIGURE_COUNT] );
};


Is there anything wrong with this code?
Last edited on
Topic archived. No new replies allowed.