Confused about flipping

Based on an axample I saw on the web, I put together a test for
changing pixel data. it was very slow. I think I have changed it to
work faster (now it only draws to the screen once) but, as that I am
not a programmer, it doesn’t work any more. what am I doing wrong.
see attached.

JR

-------------- next part --------------
A non-text attachment was scrubbed…
Name: main.cpp
Type: text/x-c++src
Size: 2080 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20021221/a8773dc3/attachment.cpp