title: process returned 255 (0xff) code blocks
body: <p>I don't know where my problem is. I tried to compile the code once and it worked. However, I copied it in a new project in order to modify it, just the colour or the time to wait, and it just works in the first programme.
  What is wrong? I feel really frustrated. 
  With this code I want to graphic the sine function.
  Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  # include &lt;SDL.h&gt;
  # include &lt;math.h&gt;
  # define PI 3.141592
  # define SCREEN_WIDTH 640
  # define SCREEN_HEIGHT 480
  
  int main(int argc, char **argv){
  
     int x,y;
  
     double fx,angulo;
  
  //   Uint8* posicion;
  
     Uint32 color;
  
     SDL_Window*win = SDL_CreateWindow("y=sin(x)", 100,100, 640, 480, 0);
  
  
  //   SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION,"info", "Window      creada",win);
  
     SDL_Renderer*ren = SDL_CreateRenderer(win, -1,   SDL_RENDERER_ACCELERATED    |     SDL_RENDERER_PRESENTVSYNC);
  
    /* Create surface */
  
    SDL_Surface*surface =   SDL_CreateRGBSurface(0,SCREEN_WIDTH,SCREEN_HEIGHT,0,32,0,0,0);
  
  
    //get the pixels
  
    Uint32*pixels = (Uint32*)surface-&gt; pixels;
  
  
    /* Lock the surface */
  
    SDL_LockSurface(surface);
  
  
     color = SDL_MapRGB(surface-&gt; format, 255, 0, 0);
  
     for(x=0;x&lt;360;x++){
  
        angulo=x*PI/180;
  
        fx=240+50*sin(angulo);
  
        y=round(fx);
  
         pixels[ ( y* surface-&gt; w ) + x ] = color;
  
       }
  
      /* Unlock the surface */
  
      SDL_UnlockSurface(surface);
  
  
      //imprescindible
  
     SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, surface);
  
     SDL_RenderCopy(ren,tex,NULL,NULL);
  
     SDL_RenderPresent(ren);
  
     SDL_Delay(1000);
  
    return 0;
  
  }   
  </code></pre>