That source only seems to open a full screen window and update it, it doesn't load or create any images unless I missed something. I don't think that does anything other than create a blank full screen window

, just initializing the game library (hence the name of the function). You need something more than that.
The author of that book likes to put tiny mistakes (intentionally or unintentially) to catch users into reading the code and thinking for themselves. Be sure you look over the code always.
Oh, and next time you paste code on these forums please use the [ code ] and [/ code ] tags, no spaces. Or just click the button that says "Code" on the reply page above the font size selection.