When i try to compile my header file, the compiler tells me " 'map' was not declared in this scope" ( the line below public:
). Why?
#pragma once
#include <SFML/Graphics.hpp>
#include <iostream>
#include <fstream>
#include <cctype>
#include <string>
#include <vector>
#ifndef TILEMAP_H
#define TILEMAP_H
class TileMap{
public:
std::vector<std::vector<sf::Vector2i>> map;
std::ifstream file;
TileMap(std::string name);
sf::Sprite tiles;
sf::Texture tileTexture;
void update();
void draw(sf::RenderWindow* window);
};
#endif