<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Image loading errors</title>
<description> I keep getting an error saying &quot;expected unqualified-id before &amp;#039;if&amp;#039;&quot;

Heres the code:

#include 
#include 

#include &quot;menu.h&quot;
#include &quot;gfx/menu_screen.h&quot;

using namespace wsp;

Sprite sprite;
Image image;

if(image.LoadImage(menu_screen) != IMG_LOAD_ERROR_NONE)exit(0);



when I remove the if statment it compiles fun (under GCC) although I need to load the image. This method loads an image from the buffer which in this case is an image that I encoded with raw2c which is found in gfx/menu_screen.h

So yeah, can someone give me some help?</description><link>http://forum.wiibrew.org/read.php?11,1398,1398#msg-1398</link><lastBuildDate>Tue, 10 Mar 2026 05:08:44 +0100</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,1398,1435#msg-1435</guid>
<title>Re: Image loading errors</title><link>http://forum.wiibrew.org/read.php?11,1398,1435#msg-1435</link><description><![CDATA[ Edit 3(?): all fixed]]></description>
<dc:creator>WiiPhlex</dc:creator>
<category>Coding</category><pubDate>Sun, 31 Aug 2008 01:48:22 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,1398,1409#msg-1409</guid>
<title>Re: Image loading errors</title><link>http://forum.wiibrew.org/read.php?11,1398,1409#msg-1409</link><description><![CDATA[ Yeah, it&#039;s a limit in the design of c++, you can&#039;t execute code outside of a function.]]></description>
<dc:creator>henke37</dc:creator>
<category>Coding</category><pubDate>Sat, 30 Aug 2008 18:45:39 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,1398,1403#msg-1403</guid>
<title>Re: Image loading errors</title><link>http://forum.wiibrew.org/read.php?11,1398,1403#msg-1403</link><description><![CDATA[ It looks like I can only load Images in the main method which is rather annoying.]]></description>
<dc:creator>WiiPhlex</dc:creator>
<category>Coding</category><pubDate>Sat, 30 Aug 2008 13:55:47 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,1398,1398#msg-1398</guid>
<title>Image loading errors</title><link>http://forum.wiibrew.org/read.php?11,1398,1398#msg-1398</link><description><![CDATA[ I keep getting an error saying "expected unqualified-id before &#039;if&#039;"<br /><br />Heres the code:<br /><br />#include <iostream><br />#include <wiisprite.h><br /><br />#include "menu.h"<br />#include "gfx/menu_screen.h"<br /><br />using namespace wsp;<br /><br />Sprite sprite;<br />Image image;<br /><br />if(image.LoadImage(menu_screen) != IMG_LOAD_ERROR_NONE)exit(0);<br /><br /><br /><br />when I remove the if statment it compiles fun (under GCC) although I need to load the image. This method loads an image from the buffer which in this case is an image that I encoded with raw2c which is found in gfx/menu_screen.h<br /><br />So yeah, can someone give me some help?]]></description>
<dc:creator>WiiPhlex</dc:creator>
<category>Coding</category><pubDate>Sat, 30 Aug 2008 11:02:31 +0200</pubDate></item>
</channel>
</rss>