OK, gracias, hice lo siguiente.
main.cpp
main.cpp
Código
game.cpp
#include <iostream> using namespace std; #include "game.hpp" int main(int argc,char *argv[]){ Game g(640,480,"Team D source enginer"); return 0; }
Código
game.hpp
#include "game.hpp" Game::Game(int w,int h,char *t){ myWindow = new sf::RenderWindow; myNameWindow = new char; GameMap *m1 = new GameMap; myNameWindow=t; cout << t; myWindow->create(sf::VideoMode(w,h,32),t); while(1){ myWindow->display(); } }
Código
#include <iostream> #include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include "gamemap.hpp" using namespace std; class Game { public: Game(int w,int h,char *t="Window test"); private: sf::RenderWindow *myWindow; char *myNameWindow; };
Me alegro de que te haya funcionado! Team D Source powa jaja