<?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[_vsnprintf&#x27; : undeclared identifier]]></title><description><![CDATA[<p>Habe folgenes Prob.<br />
: error C2065: '_vsnprintf' : undeclared identifier<br />
: warning C4018: '!=' : signed/unsigned mismatch<br />
Error executing cl.exe.</p>
<pre><code class="language-cpp">#include &quot;menu.h&quot;
#pragma warning(disable: 4244)
#pragma warning(disable: 4996)

CIngameMenu c_Menu;

void CIngameMenu::Init(IDirect3DDevice9* pDevice)
{
	// Menüeinträge in Klasse übernehmen
	for (int i=0;i&lt;ItemCount;i++) {Items[i] = MenuItems[i];}
	iSelected = 0;
	bActive = FALSE;
	ToggleKey = MENUKEY;
	// D3D Zeichenobjekt erstellen
	D3DXCreateLine(pDevice, &amp;menuLiner);
	// D3D Font erstellen
	D3DXCreateFont(pDevice, 12, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT(&quot;Arial&quot;), &amp;menuFont );
	bInited = TRUE;
}

void CIngameMenu::DeInit()
{
	// Zeichenobjekt löschen
	menuLiner-&gt;Release();
	// Font löschen
	menuFont-&gt;Release();
}

void CIngameMenu::FillRGBA(int x, int y, int w, int h, int r, int g, int b, int a)
{
	D3DXVECTOR2 vLine[2];

	// Zeichenobjekt einstellen
	menuLiner-&gt;SetWidth(w);
	menuLiner-&gt;SetAntialias(FALSE);
	menuLiner-&gt;SetGLLines(TRUE);

	vLine[0].x = x + w/2;
	vLine[0].y = y;
	vLine[1].x = x + w/2;
	vLine[1].y = y + h;

	// Zeichnen bzw. mit Farbe füllen
	menuLiner-&gt;Begin( );
	menuLiner-&gt;Draw( vLine, 2, D3DCOLOR_RGBA( r, g, b, a ) );
	menuLiner-&gt;End( );
}
void CIngameMenu::DrawBox(int x, int y, int w, int h, int r, int g, int b, int a,int rr, int gg, int bb, int aa)
{
	FillRGBA(x,y+h,w,1,r,g,b,a);
	FillRGBA(x-1,y,1,h,r,g,b,a);
	FillRGBA(x,y-1,w,1,r,g,b,a);
	FillRGBA(x+w,y,1,h,r,g,b,a);
	FillRGBA(x,y,w,h,rr,gg,bb,aa);        // Body color
}

void CIngameMenu::DrawString(int x, int y, int Red, int Green, int Blue, int Alpha, const char *text, ...)
{
	D3DCOLOR fontColor = D3DCOLOR_ARGB(Alpha, Red, Green, Blue);  
	RECT rect;
	va_list va_alist;
	char buf[256] = {0};	

	rect.left=x; 
	rect.top=y; 
	rect.right=rect.left+1000; 
	rect.bottom=rect.top+1000;

	va_start (va_alist, text);
	_vsnprintf (buf+strlen(buf), sizeof(buf) - strlen(buf), text, va_alist);
	va_end (va_alist);

	menuFont-&gt;DrawText(NULL, buf, -1, &amp;rect, 0, fontColor );   
}

void CIngameMenu::Show()
{
	if (!bInited) return;
	if(bActive)
	{
		int x = 35;    
		int y = 10;
		int r, g, b;
		int mr, mg, mb;
		int menur, menug, menub;

		r = mr = mg = mb = 255;
		g =	b = 0;
		menur =	menug =	menub = 73;

		DrawBox(x-10,y-5,170,(y-5)+(15*ItemCount)+15,255,255,240,255,menur,menug,menub,232);

		for(int i=0;i&lt;ItemCount;i++)
		{
			if(i!=iSelected)
			{
				DrawString(x,(y+15)+(15*i),mr,mg,mb,255,Items[i].Name);
				DrawString(x+135,(y+15)+(15*i),mr,mg,mb,255,&quot;%2.2f&quot;,Items[i].Value);
			}
			else
			{
				DrawString(x,(y+15)+(15*i),r,g,b,255,Items[i].Name);
				DrawString(x+135,(y+15)+(15*i),r,g,b,255,&quot;%2.2f&quot;,Items[i].Value);
			}
		}
	}
}

void CIngameMenu::KeyCheck()
{
	if (!bInited) return;
	if (GetAsyncKeyState(ToggleKey)&amp;1){
		bActive = !bActive;
	}

	// Wenn menü nicht angezeigt wird das hier nicht bearbeitet
	if (bActive){
		if (GetAsyncKeyState(VK_UP)&amp;1){
			if (iSelected &gt; 0) iSelected--;
		}else if (GetAsyncKeyState(VK_DOWN)&amp;1){
			if (iSelected &lt; ItemCount-1) iSelected++;
		}else if (GetAsyncKeyState(VK_LEFT)&amp;1){
			MenuItem* mi;

			mi = &amp;Items[iSelected];
			if (mi-&gt;Value - mi-&gt;Step &gt; mi-&gt;Min)
			{
				mi-&gt;Value = mi-&gt;Value - mi-&gt;Step;
			}else{
				mi-&gt;Value = mi-&gt;Min;
			}
			mi-&gt;Value = mi-&gt;Func(mi-&gt;Value);
		}else if (GetAsyncKeyState(VK_RIGHT)&amp;1){
			MenuItem* mi;
			mi = &amp;Items[iSelected];
			if (mi-&gt;Value &lt; mi-&gt;Max)
			{
				mi-&gt;Value = mi-&gt;Value + mi-&gt;Step;
				mi-&gt;Value = mi-&gt;Func(mi-&gt;Value);
			}
		}
	}// Bis hier nur Menu

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/191985/_vsnprintf-undeclared-identifier</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 09:20:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/191985.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 09 Sep 2007 10:01:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 10:01:13 GMT]]></title><description><![CDATA[<p>Habe folgenes Prob.<br />
: error C2065: '_vsnprintf' : undeclared identifier<br />
: warning C4018: '!=' : signed/unsigned mismatch<br />
Error executing cl.exe.</p>
<pre><code class="language-cpp">#include &quot;menu.h&quot;
#pragma warning(disable: 4244)
#pragma warning(disable: 4996)

CIngameMenu c_Menu;

void CIngameMenu::Init(IDirect3DDevice9* pDevice)
{
	// Menüeinträge in Klasse übernehmen
	for (int i=0;i&lt;ItemCount;i++) {Items[i] = MenuItems[i];}
	iSelected = 0;
	bActive = FALSE;
	ToggleKey = MENUKEY;
	// D3D Zeichenobjekt erstellen
	D3DXCreateLine(pDevice, &amp;menuLiner);
	// D3D Font erstellen
	D3DXCreateFont(pDevice, 12, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT(&quot;Arial&quot;), &amp;menuFont );
	bInited = TRUE;
}

void CIngameMenu::DeInit()
{
	// Zeichenobjekt löschen
	menuLiner-&gt;Release();
	// Font löschen
	menuFont-&gt;Release();
}

void CIngameMenu::FillRGBA(int x, int y, int w, int h, int r, int g, int b, int a)
{
	D3DXVECTOR2 vLine[2];

	// Zeichenobjekt einstellen
	menuLiner-&gt;SetWidth(w);
	menuLiner-&gt;SetAntialias(FALSE);
	menuLiner-&gt;SetGLLines(TRUE);

	vLine[0].x = x + w/2;
	vLine[0].y = y;
	vLine[1].x = x + w/2;
	vLine[1].y = y + h;

	// Zeichnen bzw. mit Farbe füllen
	menuLiner-&gt;Begin( );
	menuLiner-&gt;Draw( vLine, 2, D3DCOLOR_RGBA( r, g, b, a ) );
	menuLiner-&gt;End( );
}
void CIngameMenu::DrawBox(int x, int y, int w, int h, int r, int g, int b, int a,int rr, int gg, int bb, int aa)
{
	FillRGBA(x,y+h,w,1,r,g,b,a);
	FillRGBA(x-1,y,1,h,r,g,b,a);
	FillRGBA(x,y-1,w,1,r,g,b,a);
	FillRGBA(x+w,y,1,h,r,g,b,a);
	FillRGBA(x,y,w,h,rr,gg,bb,aa);        // Body color
}

void CIngameMenu::DrawString(int x, int y, int Red, int Green, int Blue, int Alpha, const char *text, ...)
{
	D3DCOLOR fontColor = D3DCOLOR_ARGB(Alpha, Red, Green, Blue);  
	RECT rect;
	va_list va_alist;
	char buf[256] = {0};	

	rect.left=x; 
	rect.top=y; 
	rect.right=rect.left+1000; 
	rect.bottom=rect.top+1000;

	va_start (va_alist, text);
	_vsnprintf (buf+strlen(buf), sizeof(buf) - strlen(buf), text, va_alist);
	va_end (va_alist);

	menuFont-&gt;DrawText(NULL, buf, -1, &amp;rect, 0, fontColor );   
}

void CIngameMenu::Show()
{
	if (!bInited) return;
	if(bActive)
	{
		int x = 35;    
		int y = 10;
		int r, g, b;
		int mr, mg, mb;
		int menur, menug, menub;

		r = mr = mg = mb = 255;
		g =	b = 0;
		menur =	menug =	menub = 73;

		DrawBox(x-10,y-5,170,(y-5)+(15*ItemCount)+15,255,255,240,255,menur,menug,menub,232);

		for(int i=0;i&lt;ItemCount;i++)
		{
			if(i!=iSelected)
			{
				DrawString(x,(y+15)+(15*i),mr,mg,mb,255,Items[i].Name);
				DrawString(x+135,(y+15)+(15*i),mr,mg,mb,255,&quot;%2.2f&quot;,Items[i].Value);
			}
			else
			{
				DrawString(x,(y+15)+(15*i),r,g,b,255,Items[i].Name);
				DrawString(x+135,(y+15)+(15*i),r,g,b,255,&quot;%2.2f&quot;,Items[i].Value);
			}
		}
	}
}

void CIngameMenu::KeyCheck()
{
	if (!bInited) return;
	if (GetAsyncKeyState(ToggleKey)&amp;1){
		bActive = !bActive;
	}

	// Wenn menü nicht angezeigt wird das hier nicht bearbeitet
	if (bActive){
		if (GetAsyncKeyState(VK_UP)&amp;1){
			if (iSelected &gt; 0) iSelected--;
		}else if (GetAsyncKeyState(VK_DOWN)&amp;1){
			if (iSelected &lt; ItemCount-1) iSelected++;
		}else if (GetAsyncKeyState(VK_LEFT)&amp;1){
			MenuItem* mi;

			mi = &amp;Items[iSelected];
			if (mi-&gt;Value - mi-&gt;Step &gt; mi-&gt;Min)
			{
				mi-&gt;Value = mi-&gt;Value - mi-&gt;Step;
			}else{
				mi-&gt;Value = mi-&gt;Min;
			}
			mi-&gt;Value = mi-&gt;Func(mi-&gt;Value);
		}else if (GetAsyncKeyState(VK_RIGHT)&amp;1){
			MenuItem* mi;
			mi = &amp;Items[iSelected];
			if (mi-&gt;Value &lt; mi-&gt;Max)
			{
				mi-&gt;Value = mi-&gt;Value + mi-&gt;Step;
				mi-&gt;Value = mi-&gt;Func(mi-&gt;Value);
			}
		}
	}// Bis hier nur Menu

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1361754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361754</guid><dc:creator><![CDATA[Panse]]></dc:creator><pubDate>Sun, 09 Sep 2007 10:01:13 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 11:19:06 GMT]]></title><description><![CDATA[<p>ich habe auch so einige probleme. zum beispiel habe ich noch nie im lotto gewonnen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361825</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361825</guid><dc:creator><![CDATA[Rontha]]></dc:creator><pubDate>Sun, 09 Sep 2007 11:19:06 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 11:24:56 GMT]]></title><description><![CDATA[<p>Warum bekommt man hier keine antworten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361827</guid><dc:creator><![CDATA[Panse]]></dc:creator><pubDate>Sun, 09 Sep 2007 11:24:56 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 11:53:32 GMT]]></title><description><![CDATA[<p>auf welche frage?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361842</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361842</guid><dc:creator><![CDATA[Rontha]]></dc:creator><pubDate>Sun, 09 Sep 2007 11:53:32 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 11:59:30 GMT]]></title><description><![CDATA[<p>TROLLALARM <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361847</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361847</guid><dc:creator><![CDATA[TROLLL]]></dc:creator><pubDate>Sun, 09 Sep 2007 11:59:30 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 12:10:19 GMT]]></title><description><![CDATA[<p>Habe folgenes Prob.<br />
: error C2065: '_vsnprintf' : undeclared identifier<br />
: warning C4018: '!=' : signed/unsigned mismatch<br />
Error executing cl.exe.</p>
<p>Wie bekomme ich das weg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361851</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361851</guid><dc:creator><![CDATA[pane]]></dc:creator><pubDate>Sun, 09 Sep 2007 12:10:19 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 12:35:16 GMT]]></title><description><![CDATA[<p>_vsnprintf gehört nicht zum Standard, da musst du schon in der Doku deines Compilers nachschauen, ob so eine Funktion unterstütz wird.<br />
In C++ ist es aber auch nicht zu empfehlen, VA Listen zu verwenden. Streaming wie bei cout ist da besser.</p>
<p>Zu der Warnung, du solltest keine signed/unsigned Werte vergleichen. Entweder beide signed oder beide unsigned. Alles andere kann zu falschen Ergebnissen führen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361862</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sun, 09 Sep 2007 12:35:16 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 12:39:13 GMT]]></title><description><![CDATA[<p>Wo kann ich die Doku den sehen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361864</guid><dc:creator><![CDATA[Panse]]></dc:creator><pubDate>Sun, 09 Sep 2007 12:39:13 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 13:05:04 GMT]]></title><description><![CDATA[<p>hast du überhaupt die includes drin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361884</guid><dc:creator><![CDATA[gizg]]></dc:creator><pubDate>Sun, 09 Sep 2007 13:05:04 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 14:02:25 GMT]]></title><description><![CDATA[<p>Ja das habe ich auch gemacht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1361905</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1361905</guid><dc:creator><![CDATA[Panse]]></dc:creator><pubDate>Sun, 09 Sep 2007 14:02:25 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Sun, 09 Sep 2007 19:58:04 GMT]]></title><description><![CDATA[<p>Panse schrieb:</p>
<blockquote>
<p>Wo kann ich die Doku den sehen?</p>
</blockquote>
<p>Also spätestens HIER könnte Dir klar werden, warum niemand das beantworten kann: Woher soll irgendjemand hier besser wissen als Du ?</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362194</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362194</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Sun, 09 Sep 2007 19:58:04 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Mon, 10 Sep 2007 16:05:25 GMT]]></title><description><![CDATA[<p>Panse schrieb:</p>
<blockquote>
<p>Wo kann ich die Doku den sehen?</p>
</blockquote>
<p>Keine Ahnung. Wir wissen ja noch nicht mal, welchen Compiler du verwendest. ZB bei GCC (MinGW) sollte die im <em>info</em> Verzeichnis sein.</p>
<p>Ansonsten, durchsuche mal das <em>include</em> Verzeichnis, ob entsprechender Bezeichner überhaupt existiert.</p>
<p>Btw, wie kommst du überhaupt auf _vsnprintf?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362713</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362713</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Mon, 10 Sep 2007 16:05:25 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Mon, 10 Sep 2007 17:12:17 GMT]]></title><description><![CDATA[<p>Wer selbst nicht suchen will</p>
<p><a href="http://msdn2.microsoft.com/en-us/library/1kt27hek(VS.80).aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/1kt27hek(VS.80).aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362764</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362764</guid><dc:creator><![CDATA[rththtrh]]></dc:creator><pubDate>Mon, 10 Sep 2007 17:12:17 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Wed, 12 Sep 2007 12:41:40 GMT]]></title><description><![CDATA[<p>Angemerkt sei, dass dies nur für den MSC gilt. Und da es das Standard Forum ist, ist nur ISO/IEC 14882 relevant. _/vsnprintf ist jedenfalls nur compilerspezifisch implementiert. Alle unterstützten C Funktionen, auch die mit VA Listen, findet man übrigens unter C.2-7.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363984</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Wed, 12 Sep 2007 12:41:40 GMT</pubDate></item><item><title><![CDATA[Reply to _vsnprintf&#x27; : undeclared identifier on Wed, 12 Sep 2007 16:13:36 GMT]]></title><description><![CDATA[<p>meines kleinen wissens nach, sind alle funktionen mit einem unterstrich, und darauffolgender kleinschreibung keine standardfunktionen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364134</guid><dc:creator><![CDATA[ggrgt]]></dc:creator><pubDate>Wed, 12 Sep 2007 16:13:36 GMT</pubDate></item></channel></rss>