I don't like to ask for help on here more than once a week, but I've not been able to make any progress today because of this random error I'm getting. I've created many classes with their own header file but I have no idea why this will not compile.
TileMap.cpp
#include"TileMap.h"
#include<iostream>
#include<string>
#include<vector>
//----------------------------
#include<SFML/Graphics.hpp>
#include<SFML/Window.hpp>
#include<SFML/System.hpp>
//----------------------------
using namespace std;
//Overload Constructors
TileMap::TileMap(string inName, string inLoc)
{
setName(inName);
setLoc(inLoc);
}
//Mutators
void TileMap::setName(string inName){name=inName;}
void TileMap::setLoc(string inLoc){loc=inLoc;}
//Accessors
string TileMap::getName(){return name;}
string TileMap::getLocd(){return loc;}
TileMap.h
#ifndef TILEMAP_H
#define TILEMAP_H
#include <iostream>
#include <vector>
#include <string>
class TileMap()
{
public:
TileMap(std::string name, std::string loc);
void setName(std::string inName);
void setLoc(std::string inLoc);
std::string getName();
std::string getLoc();
private:
std::string name;
std::string loc;
};
#endif
Error
In file included from TileMap.cpp:1:0:
TileMap.h:8:15: error: expected unqualified-id before ‘)’ token
TileMap.cpp:17:45: error: invalid use of incomplete type ‘struct TileMap’
TileMap.h:8:7: error: forward declaration of ‘struct TileMap’
TileMap.cpp:24:36: error: invalid use of incomplete type ‘struct TileMap’
TileMap.h:8:7: error: forward declaration of ‘struct TileMap’
TileMap.cpp:25:34: error: invalid use of incomplete type ‘struct TileMap’
TileMap.h:8:7: error: forward declaration of ‘struct TileMap’
TileMap.cpp:28:25: error: invalid use of incomplete type ‘struct TileMap’
TileMap.h:8:7: error: forward declaration of ‘struct TileMap’
TileMap.cpp:29:25: error: invalid use of incomplete type ‘struct TileMap’
TileMap.h:8:7: error: forward declaration of ‘struct TileMap’
Please inform me of the small error I have been searching for all day... I'm past the point of caring about embarrassment.
Tips?