Thanks for your answer Laurent, my complete code is:
// include SFML headers
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
// include other headers
#include <string>
// custom headers
#include <userCharacter.h>
#include <collisionDetection.h>
// global settings
bool showSplashScreen = false;
bool isGameAvailable = false;
bool isGameExiting = false;
bool isGamePaused = false;
bool isShowingMenu = false;
// game title
sf::Font font;
font.loadFromFile("arial.ttf");
sf::Text text("GameName", font, 50);
// main loop
int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "GameName");
window.setFramerateLimit(60);
// Start the game loop
while (window.isOpen())
{
// Process events
sf::Event event;
while (window.pollEvent(event))
{
// Close window : exit
if (event.type == sf::Event::Closed)
window.close();
}
// Clear screen
window.clear();
// Draw text
window.draw(text);
// Update the window
window.display();
}
return 0;
}
my character header (not finished lol) is:
#ifndef USERCHARACTER_H
#define USERCHARACTER_H
class userCharacter{
private:
std::string characterName;
int characterLevel;
float characterExperience;
public:
userCharacter( std::string cName, int cLevel, float cExperience );
};
#endif // USERCHARACTER_H
best regards