   [c++] linker & headers problems
  Hello again I`m trying to clean my code a bit (all stuff was in one file) and split it into headers, but i have problem with one function.thats funkcje.h file#ifndef FUNKCJE_H_INCLUDED#define FUNKCJE_H_INCLUDED   SDL_Surface *load_image( std::string filename )#endif // TIMER_H_INCLUDEDand funkcje.cpp#ifdef __cplusplus    #include <cstdlib>#else    #include <stdlib.h>#endif#ifdef __APPLE__#include <SDL/SDL.h>#else#include <SDL.h>#endif#include <string>SDL_Surface *load_image( std::string filename ){    SDL_Surface* loadedImage = NULL;//Temporary storage for the image that's loaded    SDL_Surface* optimizedImage = NULL;//The optimized image that will be used    loadedImage = SDL_LoadBMP( filename.c_str() );//Load the image    if( loadedImage != NULL )//If nothing went wrong in loading the image    { optimizedImage = SDL_DisplayFormat( loadedImage );//Create an optimized image SDL_FreeSurface( loadedImage );//Free the old image printf(filename.c_str()); printf(" loaded properly\n"); //log entry    } else printf(" file is fucked up or missing\n"); //Map the color keyUint32 colorkey = SDL_MapRGB( optimizedImage->format, 0xFF, 0, 0xFF );//Set all pixels of color R 0, G 0xFF, B 0xFF to be transparentSDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, colorkey );    return optimizedImage;//Return the optimized image}and now the main.cpp#ifdef __cplusplus    #include <cstdlib>#else    #include <stdlib.h>#endif#ifdef __APPLE__#include <SDL/SDL.h>#else#include <SDL.h>#endif#include <string>#include "SDL_ttf.h"#include <sstream>#include "timer.h"#include "funkcje.h"SDL_Color textColor = { 0, 0, 0 }; //i pasted that one coz compiler says "error: expected initializer before 'SDL_Color'"void load_files(){    player    = load_image( "player.bmp"    );    sky    = load_image( "sky.bmp"   );    ground = load_image( "ground.bmp");}int main ( int argc, char** argv ){load_files();//......cutted  codereturn 0}I get "error: 'load_image' was not declared in this scope" so i think it means that linker can`t find my function in other file, but why ? and why i get that strange error about my variable SDL_Color?if i put #include "funkcje.h" in comments (and ofcourse comment content of load_files) i don`t get any errors even with that SDL_Color.   
  For a start you're missing a semi-colon....#ifndef FUNKCJE_H_INCLUDED#define FUNKCJE_H_INCLUDED   SDL_Surface *load_image( std::string filename );#endif // TIMER_H_INCLUDED;For a start you're missing a semi-colon....#ifndef FUNKCJE_H_INCLUDED#define FUNKCJE_H_INCLUDED   SDL_Surface *load_image( std::string filename );#endif // TIMER_H_INCLUDEDThats solved the problem.  Cheers mate time to go sleep ;  Why do you have the following code, as your code will not compile using C due to std::string, the string include and the sstream include?#ifdef __cplusplus    #include <cstdlib>#else    #include <stdlib.h>#endif