2

ヘッダー ファイルをコンパイルしようとすると、コンパイラから「'map' はこのスコープで宣言されていません」(下の行public:) と表示されます。なんで?

#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
4

1 に答える 1