<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ergebnistyp fuer Konstruktoren nicht erlaubt ?!]]></title><description><![CDATA[<pre><code class="language-cpp">#include &quot;SDL/SDL.h&quot;
#include &quot;SDL_SurfaceWrapper.h&quot;

SDL_SurfaceWrapper::SDL_SurfaceWrapper(SDL_Surface *src)
{
	copySurface(src);
}
SDL_SurfaceWrapper::SDL_SurfaceWrapper(const SDL_SurfaceWrapper &amp;s)
{
	copySurface(s.surface);
}
	//dtor
SDL_SurfaceWrapper::~SDL_SurfaceWrapper()
{
	SDL_FreeSurface(surface);
}

	//assign
const SDL_SurfaceWrapper&amp; SDL_SurfaceWrapper::operator=(const SDL_SurfaceWrapper &amp;right)
{
	copySurface(right.surface);
}
	//copy a surface include pixel data
void SDL_SurfaceWrapper::copySurface(SDL_Surface *src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, src-&gt;w, src-&gt;h, src-&gt;format-&gt;BitsPerPixel, src-&gt;format-&gt;Rmask, src-&gt;format-&gt;Gmask, src-&gt;format-&gt;Bmask, src-&gt;format-&gt;Amask );
	SDL_BlitSurface( src, NULL, surface, NULL );
}
		//create an empty surface from a surface
void SDL_SurfaceWrapper::fromSurface(SDL_Surface *src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, src-&gt;w, src-&gt;h, src-&gt;format-&gt;BitsPerPixel, src-&gt;format-&gt;Rmask, src-&gt;format-&gt;Gmask, src-&gt;format-&gt;Bmask, src-&gt;format-&gt;Amask );
}
	//same as above but with user-set size
void SDL_SurfaceWrapper::fromSurface(int w, int h, SDL_Surface *src)
{

	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, w, h, src-&gt;format-&gt;BitsPerPixel, src-&gt;format-&gt;Rmask, src-&gt;format-&gt;Gmask, src-&gt;format-&gt;Bmask, src-&gt;format-&gt;Amask );
}
	//same for wrapper

	//create an empty surface from a surface
void SDL_SurfaceWrapper::fromSurface(SDL_SurfaceWrapper src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, src.surface-&gt;w, src.surface-&gt;h, src.surface-&gt;format-&gt;BitsPerPixel, src.surface-&gt;format-&gt;Rmask, src.surface-&gt;format-&gt;Gmask, src.surface-&gt;format-&gt;Bmask, src.surface-&gt;format-&gt;Amask );
}
	//same as above but with user-set size
void SDL_SurfaceWrapper::fromSurface(int w, int h, SDL_SurfaceWrapper src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, w, h, src.surface-&gt;format-&gt;BitsPerPixel, src.surface-&gt;format-&gt;Rmask, src.surface-&gt;format-&gt;Gmask, src.surface-&gt;format-&gt;Bmask, src.surface-&gt;format-&gt;Amask );
}
</code></pre>
<p>-------&gt;</p>
<blockquote>
<p>E:\Uni\code\PixGraph\SDL_SurfaceWrapper.cpp(6) : error C2533: 'SDL_SurfaceWrapper::SDL_SurfaceWrapper' : Ergebnistyp fuer Konstruktoren nicht erlaubt</p>
</blockquote>
<p>header datei:</p>
<pre><code class="language-cpp">#ifndef SDL_SurfaceWrapper_h
#define SDL_SurfaceWrapper_h 1

class SDL_SurfaceWrapper
{
public:
	// copy ctor
    SDL_SurfaceWrapper(const SDL_SurfaceWrapper &amp;s);
	//
	SDL_SurfaceWrapper(SDL_Surface *src);
	//dtor
	virtual ~SDL_SurfaceWrapper();

	//assign
	const SDL_SurfaceWrapper&amp; operator=(const SDL_SurfaceWrapper &amp;right);
	//copy a surface include pixel data
	void copySurface(SDL_Surface *src);
	//create an empty surface from a surface
	void fromSurface(SDL_Surface *src);
	//same as above but with user-set size
	void fromSurface(int w, int h, SDL_Surface *src);
	//same for wrapper

	//create an empty surface from a surface
	void fromSurface(SDL_SurfaceWrapper src);
	//same as above but with user-set size
	void fromSurface(int w, int h, SDL_SurfaceWrapper src);
	//the real surface:
	SDL_Surface *surface;
private:

}
#endif
</code></pre>
<p>wie kommt diese fehlermeldung zu stande? ich seh da keinen ergebnisstyp</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/186845/ergebnistyp-fuer-konstruktoren-nicht-erlaubt</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 11:34:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/186845.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Jul 2007 05:06:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ergebnistyp fuer Konstruktoren nicht erlaubt ?! on Fri, 13 Jul 2007 05:06:54 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &quot;SDL/SDL.h&quot;
#include &quot;SDL_SurfaceWrapper.h&quot;

SDL_SurfaceWrapper::SDL_SurfaceWrapper(SDL_Surface *src)
{
	copySurface(src);
}
SDL_SurfaceWrapper::SDL_SurfaceWrapper(const SDL_SurfaceWrapper &amp;s)
{
	copySurface(s.surface);
}
	//dtor
SDL_SurfaceWrapper::~SDL_SurfaceWrapper()
{
	SDL_FreeSurface(surface);
}

	//assign
const SDL_SurfaceWrapper&amp; SDL_SurfaceWrapper::operator=(const SDL_SurfaceWrapper &amp;right)
{
	copySurface(right.surface);
}
	//copy a surface include pixel data
void SDL_SurfaceWrapper::copySurface(SDL_Surface *src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, src-&gt;w, src-&gt;h, src-&gt;format-&gt;BitsPerPixel, src-&gt;format-&gt;Rmask, src-&gt;format-&gt;Gmask, src-&gt;format-&gt;Bmask, src-&gt;format-&gt;Amask );
	SDL_BlitSurface( src, NULL, surface, NULL );
}
		//create an empty surface from a surface
void SDL_SurfaceWrapper::fromSurface(SDL_Surface *src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, src-&gt;w, src-&gt;h, src-&gt;format-&gt;BitsPerPixel, src-&gt;format-&gt;Rmask, src-&gt;format-&gt;Gmask, src-&gt;format-&gt;Bmask, src-&gt;format-&gt;Amask );
}
	//same as above but with user-set size
void SDL_SurfaceWrapper::fromSurface(int w, int h, SDL_Surface *src)
{

	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, w, h, src-&gt;format-&gt;BitsPerPixel, src-&gt;format-&gt;Rmask, src-&gt;format-&gt;Gmask, src-&gt;format-&gt;Bmask, src-&gt;format-&gt;Amask );
}
	//same for wrapper

	//create an empty surface from a surface
void SDL_SurfaceWrapper::fromSurface(SDL_SurfaceWrapper src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, src.surface-&gt;w, src.surface-&gt;h, src.surface-&gt;format-&gt;BitsPerPixel, src.surface-&gt;format-&gt;Rmask, src.surface-&gt;format-&gt;Gmask, src.surface-&gt;format-&gt;Bmask, src.surface-&gt;format-&gt;Amask );
}
	//same as above but with user-set size
void SDL_SurfaceWrapper::fromSurface(int w, int h, SDL_SurfaceWrapper src)
{
	surface = SDL_CreateRGBSurface( SDL_SWSURFACE, w, h, src.surface-&gt;format-&gt;BitsPerPixel, src.surface-&gt;format-&gt;Rmask, src.surface-&gt;format-&gt;Gmask, src.surface-&gt;format-&gt;Bmask, src.surface-&gt;format-&gt;Amask );
}
</code></pre>
<p>-------&gt;</p>
<blockquote>
<p>E:\Uni\code\PixGraph\SDL_SurfaceWrapper.cpp(6) : error C2533: 'SDL_SurfaceWrapper::SDL_SurfaceWrapper' : Ergebnistyp fuer Konstruktoren nicht erlaubt</p>
</blockquote>
<p>header datei:</p>
<pre><code class="language-cpp">#ifndef SDL_SurfaceWrapper_h
#define SDL_SurfaceWrapper_h 1

class SDL_SurfaceWrapper
{
public:
	// copy ctor
    SDL_SurfaceWrapper(const SDL_SurfaceWrapper &amp;s);
	//
	SDL_SurfaceWrapper(SDL_Surface *src);
	//dtor
	virtual ~SDL_SurfaceWrapper();

	//assign
	const SDL_SurfaceWrapper&amp; operator=(const SDL_SurfaceWrapper &amp;right);
	//copy a surface include pixel data
	void copySurface(SDL_Surface *src);
	//create an empty surface from a surface
	void fromSurface(SDL_Surface *src);
	//same as above but with user-set size
	void fromSurface(int w, int h, SDL_Surface *src);
	//same for wrapper

	//create an empty surface from a surface
	void fromSurface(SDL_SurfaceWrapper src);
	//same as above but with user-set size
	void fromSurface(int w, int h, SDL_SurfaceWrapper src);
	//the real surface:
	SDL_Surface *surface;
private:

}
#endif
</code></pre>
<p>wie kommt diese fehlermeldung zu stande? ich seh da keinen ergebnisstyp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324255</guid><dc:creator><![CDATA[pixartist]]></dc:creator><pubDate>Fri, 13 Jul 2007 05:06:54 GMT</pubDate></item><item><title><![CDATA[Reply to Ergebnistyp fuer Konstruktoren nicht erlaubt ?! on Fri, 13 Jul 2007 05:25:08 GMT]]></title><description><![CDATA[<p>semikolon hinter der klassendefinition vergessen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1324258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1324258</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Fri, 13 Jul 2007 05:25:08 GMT</pubDate></item></channel></rss>