Hi, i am new to c++, i am using code::blocks.
I was using Lazarus for object-pascal programming with a good knowledge but now i decided to learn c++, adding a challenge to my programming way.
Trying to port my .pas game to .cpp using SDL2 game engine.
header.h
1 2 3 4 5
class CTexture
{
public:
SDL_Texture Load( string Dir );
}
header.cpp
1 2 3 4 5 6
SDL_Texture CTexture::Load( string Dir )
{
...
// This function will load texture from disk ( i know how to do it, my problem is other)
...
}
Errors found:
In header.h
1 2
error: 'string' has not been declared
error: candidate is: SDL_Texture CTexture::Load(int)
In header.cpp
error: prototype for'SDL_Texture CTexture::Load(std::string)' does not match any in class'CTexture'