<?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[Pointer verstellen sich nach der while-schleife]]></title><description><![CDATA[<p>Hallo,<br />
ich habe mal wieder ein Problem.</p>
<p>Wenn ich im folgendem Code &quot;Entrys[0].KeyName&quot; ausgeben will,<br />
kann ich das nur innerhalb der while-Schleife.</p>
<pre><code>private:
		typedef struct entry
		{
			TCHAR * KeyName;
			TCHAR * Value;
		} INIENTRY;

//-------------- Vars -------------------------------------------------------
	private:
		TCHAR * m_tBuffer;
		DWORD m_iFileSize;
		__int32 m_iEntryCount;

	public:
		INIENTRY * Entrys;
		bool read_successfully;

...

void _fastParseFile()
{
	TCHAR * buf = m_tBuffer;
	__int32 pos = 0;
	m_iEntryCount = _getEntryCount(m_tBuffer);
	Entrys = new INIENTRY[m_iEntryCount];
	while(pos++ &lt; m_iEntryCount)
	{
		Entrys[pos].KeyName = buf;
		while(*buf++ != INI_SEPERATOR);
		Entrys[pos].Value = buf;
		while(*buf++ != INI_END_OF_VALUE);
	}
}
</code></pre>
<p>m_iEntryCount = 4<br />
m_tBuffer ist nicht leer!</p>
<p>Danke im Vorraus!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/232765/pointer-verstellen-sich-nach-der-while-schleife</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 05:07:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/232765.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Jan 2009 20:40:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pointer verstellen sich nach der while-schleife on Mon, 26 Jan 2009 20:40:35 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe mal wieder ein Problem.</p>
<p>Wenn ich im folgendem Code &quot;Entrys[0].KeyName&quot; ausgeben will,<br />
kann ich das nur innerhalb der while-Schleife.</p>
<pre><code>private:
		typedef struct entry
		{
			TCHAR * KeyName;
			TCHAR * Value;
		} INIENTRY;

//-------------- Vars -------------------------------------------------------
	private:
		TCHAR * m_tBuffer;
		DWORD m_iFileSize;
		__int32 m_iEntryCount;

	public:
		INIENTRY * Entrys;
		bool read_successfully;

...

void _fastParseFile()
{
	TCHAR * buf = m_tBuffer;
	__int32 pos = 0;
	m_iEntryCount = _getEntryCount(m_tBuffer);
	Entrys = new INIENTRY[m_iEntryCount];
	while(pos++ &lt; m_iEntryCount)
	{
		Entrys[pos].KeyName = buf;
		while(*buf++ != INI_SEPERATOR);
		Entrys[pos].Value = buf;
		while(*buf++ != INI_END_OF_VALUE);
	}
}
</code></pre>
<p>m_iEntryCount = 4<br />
m_tBuffer ist nicht leer!</p>
<p>Danke im Vorraus!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1652875</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1652875</guid><dc:creator><![CDATA[AeroX]]></dc:creator><pubDate>Mon, 26 Jan 2009 20:40:35 GMT</pubDate></item><item><title><![CDATA[Reply to Pointer verstellen sich nach der while-schleife on Mon, 26 Jan 2009 22:27:27 GMT]]></title><description><![CDATA[<ol>
<li>die Mehrzahl von entry ist entries.</li>
<li>voraus schreibt man mit einem r.</li>
<li>da du Entrys[0] nie angreifst wird auch nix sinnvolles drinstehen können, nen?</li>
</ol>
<p>Tip: <code>while (pos++ &lt; foo) ...</code> macht nicht das was du willst. Du willst <code>for (size_t pos = 0; pos &lt; foo; pos++) ...</code> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1652925</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1652925</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 26 Jan 2009 22:27:27 GMT</pubDate></item><item><title><![CDATA[Reply to Pointer verstellen sich nach der while-schleife on Tue, 27 Jan 2009 07:15:03 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-275.html" rel="nofollow">Unix-Tom</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-1.html" rel="nofollow">MFC (Visual C++)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1653009</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653009</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 27 Jan 2009 07:15:03 GMT</pubDate></item><item><title><![CDATA[Reply to Pointer verstellen sich nach der while-schleife on Tue, 27 Jan 2009 15:41:29 GMT]]></title><description><![CDATA[<p>Und wo lag da jetzt der Fehler?</p>
<p>Was macht die while-Schleife anders?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1653294</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653294</guid><dc:creator><![CDATA[AeroX]]></dc:creator><pubDate>Tue, 27 Jan 2009 15:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to Pointer verstellen sich nach der while-schleife on Tue, 27 Jan 2009 18:13:21 GMT]]></title><description><![CDATA[<p>&quot;pos++&quot; ist zwar post-inkrement, aber &quot;post&quot; bezieht sich nicht auf die while schleife, sondern auf die &quot;expression&quot;. d.h. beim 1. durchlauf von &quot;while (pos++ &lt; foo)&quot; ist pos bereits 1, nicht 0.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1653397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653397</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 27 Jan 2009 18:13:21 GMT</pubDate></item><item><title><![CDATA[Reply to Pointer verstellen sich nach der while-schleife on Tue, 27 Jan 2009 19:18:54 GMT]]></title><description><![CDATA[<p>Vielen Dank <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1653433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1653433</guid><dc:creator><![CDATA[AeroX]]></dc:creator><pubDate>Tue, 27 Jan 2009 19:18:54 GMT</pubDate></item></channel></rss>