Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Global.h
- //globals container
- #ifndef GLOBAL_H
- #define GLOBAL_H
- #include <SFML/Graphics.hpp>
- #include <random>
- struct Global
- {
- static sf::RenderWindow window;
- static int blocksWide;
- static int blocksTall;
- static int blockSize;
- static const int desiredBlocksWide;
- static const int desiredBlocksTall;
- };
- #endif
- //Global.cpp
- #include "Global.h"
- sf::RenderWindow Global::window; //throws here
- int Global::blocksWide = 0;
- int Global::blocksTall = 0;
- int Global::blockSize;
- const int Global::desiredBlocksWide = 20;
- const int Global::desiredBlocksTall = 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement