SFML community forums
Help => General => Topic started by: Fierce_Dutch on December 02, 2010, 06:57:26 am
-
Here is my constructor and I am wondering why it is saying the arguments arent right.
in c++ file
xtra::Tile::Tile(const enum Tile::TileType type, int x, int y)
in .h file
Tile(const enum TileType type, int x, int y);
Help! btw it is a child of sf::Sprite if that matters
-
Which line of code does the error refer to (is it when you use the constructor?)? What is the exact error message?
-
Do you really have a enum TileType inside your Tile class?
class Tile : public sf::Sprite
{
public:
enum TileType
{
Type1, Type2
};
Someone know if he have a difference between
Tile(const enum TileType type, int x, int y);
//and
Tile(const TileType type, int x, int y);
It's just to remember this type is a enum?
-
Someone know if he have a difference between
Tile(const enum TileType type, int x, int y);
//and
Tile(const TileType type, int x, int y);
It's just to remember this type is a enum?
There's no difference, this is just a C-style declaration of a variable. In C++ we don't do that. It is similar to "struct Toto toto".