How to implement escape Sequence in SDL

Posted by Sa'me Smd on Stack Overflow See other posts from Stack Overflow or by Sa'me Smd
Published on 2010-12-27T16:32:24Z Indexed on 2010/12/27 16:54 UTC
Read the original article Hit count: 309

Filed under:
|
|
|

Im trying to use the STL library inside the SDL. but it gives me the error
"undeclared identifier" Is there any way i can use "\n"or even cout<<endl; Can the function SDL_WarpMousewhich places the mouse cursor on a desired location on screen help me with this. Because i want to put a tile on the next line sequence.
I hope you get the Question. Its very vague and messed up question though (sorry for that).

EDIT:

void putMap(SDL_Surface* tile, SDL_Surface* screen)
{
    for(int y = 0; y < 21; y++)
    {
        for(int x = 0; x < 60; x++)
        {
            if(maze[x][y] != '#')
            {
                apply_surface( x*10 , y*10 , tile, screen);
            }
        }
        cout<<endl;
    }
}

c:\documents and settings\administrator\my documents\visual studio 2008\projects\craptest\craptest\main.cpp(605) : error C2065: 'cout' : undeclared identifier

c:\documents and settings\administrator\my documents\visual studio 2008\projects\craptest\craptest\main.cpp(605) : error C2065: 'endl' : undeclared identifier

This is my apply_surface funtion.

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination )
{
    //Make a temporary rectangle to hold the offsets
    SDL_Rect offset;

    //Give the offsets to the rectangle
    offset.x = x;
    offset.y = y;

    //Blit the surface
    SDL_BlitSurface( source, NULL, destination, &offset );
}

© Stack Overflow or respective owner

Related posts about c++

Related posts about graphics