Okay so I'm currently starting to work in SFML and I'm looking at making my first engine after studying a few other game engines I've seen. So basically right now I have a "gamestate" class then another class for levels. I'm trying to pass a string to the other class so I can change what the window title says to get an idea of how things work.. so I will show you an example.
I'm getting the following errors:
void A::function(std::string Name)
a.function("string to window");
I see that its trying to pass it is trying to pass it as a character array which obviously wont work, but how do i go about it.. do i need to typecast or something??
/home/cody/Documents/GameEngine/src/GameState.cpp||In member function ‘void GameState::Run()’:|
/home/cody/Documents/GameEngine/src/GameState.cpp|18|error: no matching function for call to ‘Engine::Run(const char )’|
/home/cody/Documents/GameEngine/include/Engine.h|20|note: candidates are: void Engine::Run()|
||=== Build finished: 1 errors, 0 warnings ===|
Also.. not the appropriate forum but with things like image loading is it necessary to have a class?? I feel simply using functions would be easier. Thanks