<?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[Probleme mit std::map und std::fstream]]></title><description><![CDATA[<p>Hi<br />
ich versuche gerade einen platformunäbhangigen INI Parser zu Proggen und bin auch schon fast fertig.<br />
ich habe nur noch das Problem das ich diese letzten Compiler Errors nicht verstehe,<br />
die ich zu folgendem code kriege(Ich habe VC2003):</p>
<p>CODE:</p>
<pre><code class="language-cpp">// parserini.cpp
	//Z.85
	this-&gt;keys.push_back(std::pair&lt;std::basic_string&lt;char_t&gt;, bool&gt;(key, is_key)); 
	//Z. 86
	typedef (std::map&lt; std::pair&lt; std::basic_string&lt;char_t&gt;, std::basic_string&lt;char_t&gt; &gt; &gt;::iterator) map_iter_t; 
	//Z. 87
	map_iter_t ins_pos; 
	//Z.88
	ins_pos = data.find(std::pair&lt;std::basic_string&lt;char_t&gt;, std::basic_string&lt;char_t&gt; &gt;(section, key)); 
	//Z.89
	this-&gt;data.insert(ins_pos, value);
</code></pre>
<p>(char_t ist ein typedef für char)</p>
<p>COMPILER ERRORS</p>
<pre><code>\INI\parserini.cpp(86): error C2976: 'std::map' : too few template arguments
	\INI\parserini.cpp(86): error C2955: 'std::map' : use of class template requires template argument list
	\INI\parserini.cpp(86): error C2275: 'std::map&lt;_Kty,_Ty,_Pr,_Alloc&gt;::iterator' : illegal use of this type as an expression
	\INI\parserini.cpp(86): error C2146: syntax error : missing ';' before identifier 'map_iter_t'
	\INI\parserini.cpp(86): error C2065: 'map_iter_t' : undeclared identifier
	\INI\parserini.cpp(87): error C2146: syntax error : missing ';' before identifier 'ins_pos'
	\INI\parserini.cpp(87): error C3861: 'map_iter_t': identifier not found, even with argument-dependent lookup
	\INI\parserini.cpp(87): error C2065: 'ins_pos' : undeclared identifier
	\INI\parserini.cpp(88): error C3861: 'ins_pos': identifier not found, even with argument-dependent lookup
	\INI\parserini.cpp(89): error C3861: 'ins_pos': identifier not found, even with argument-dependent lookup
	\file.cpp(73): error C2558: class 'std::basic_fstream&lt;_Elem,_Traits&gt;' : no copy constructor available or copy constructor is declared 'explicit'
	        with
	        [
	            _Elem=char,
	            _Traits=std::char_traits&lt;char&gt;
	        ]
</code></pre>
<p>Der Letzte Error bezieht sich auf die Funktion</p>
<pre><code class="language-cpp">std::basic_fstream&lt;char_t&gt; File::get_stream()
	{
		return this-&gt;stream;
	}
</code></pre>
<p>Kann mir jemand helfen?</p>
<p>Mfg Shade37337</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/148540/probleme-mit-std-map-und-std-fstream</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Sep 2026 21:48:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/148540.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 27 May 2006 19:59:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 19:59:33 GMT]]></title><description><![CDATA[<p>Hi<br />
ich versuche gerade einen platformunäbhangigen INI Parser zu Proggen und bin auch schon fast fertig.<br />
ich habe nur noch das Problem das ich diese letzten Compiler Errors nicht verstehe,<br />
die ich zu folgendem code kriege(Ich habe VC2003):</p>
<p>CODE:</p>
<pre><code class="language-cpp">// parserini.cpp
	//Z.85
	this-&gt;keys.push_back(std::pair&lt;std::basic_string&lt;char_t&gt;, bool&gt;(key, is_key)); 
	//Z. 86
	typedef (std::map&lt; std::pair&lt; std::basic_string&lt;char_t&gt;, std::basic_string&lt;char_t&gt; &gt; &gt;::iterator) map_iter_t; 
	//Z. 87
	map_iter_t ins_pos; 
	//Z.88
	ins_pos = data.find(std::pair&lt;std::basic_string&lt;char_t&gt;, std::basic_string&lt;char_t&gt; &gt;(section, key)); 
	//Z.89
	this-&gt;data.insert(ins_pos, value);
</code></pre>
<p>(char_t ist ein typedef für char)</p>
<p>COMPILER ERRORS</p>
<pre><code>\INI\parserini.cpp(86): error C2976: 'std::map' : too few template arguments
	\INI\parserini.cpp(86): error C2955: 'std::map' : use of class template requires template argument list
	\INI\parserini.cpp(86): error C2275: 'std::map&lt;_Kty,_Ty,_Pr,_Alloc&gt;::iterator' : illegal use of this type as an expression
	\INI\parserini.cpp(86): error C2146: syntax error : missing ';' before identifier 'map_iter_t'
	\INI\parserini.cpp(86): error C2065: 'map_iter_t' : undeclared identifier
	\INI\parserini.cpp(87): error C2146: syntax error : missing ';' before identifier 'ins_pos'
	\INI\parserini.cpp(87): error C3861: 'map_iter_t': identifier not found, even with argument-dependent lookup
	\INI\parserini.cpp(87): error C2065: 'ins_pos' : undeclared identifier
	\INI\parserini.cpp(88): error C3861: 'ins_pos': identifier not found, even with argument-dependent lookup
	\INI\parserini.cpp(89): error C3861: 'ins_pos': identifier not found, even with argument-dependent lookup
	\file.cpp(73): error C2558: class 'std::basic_fstream&lt;_Elem,_Traits&gt;' : no copy constructor available or copy constructor is declared 'explicit'
	        with
	        [
	            _Elem=char,
	            _Traits=std::char_traits&lt;char&gt;
	        ]
</code></pre>
<p>Der Letzte Error bezieht sich auf die Funktion</p>
<pre><code class="language-cpp">std::basic_fstream&lt;char_t&gt; File::get_stream()
	{
		return this-&gt;stream;
	}
</code></pre>
<p>Kann mir jemand helfen?</p>
<p>Mfg Shade37337</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066377</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066377</guid><dc:creator><![CDATA[branleb]]></dc:creator><pubDate>Sat, 27 May 2006 19:59:33 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 20:05:36 GMT]]></title><description><![CDATA[<p><a href="http://www.sgi.com/tech/stl/Map.html" rel="nofollow">http://www.sgi.com/tech/stl/Map.html</a><br />
Es muss</p>
<pre><code class="language-cpp">std::map&lt;std::basic_string&lt;char_t&gt;, std::basic_string&lt;char_t&gt; &gt;
</code></pre>
<p>heißen.</p>
<p>Mach bezüglich des zweiten Fehlers aus den Rückgabeparameter eine Referenz, Streams sind nicht kopierbar (was dir der Compiler auch mitteilt!).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066382</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066382</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Sat, 27 May 2006 20:05:36 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 20:12:07 GMT]]></title><description><![CDATA[<p>mein key_type der map is aber ein std::pair&lt;std::basic_string&lt;char_t&gt;,std::basic_string&lt;char_t&gt; &gt;</p>
<p>danke aber nochma wegen der fstream prob lösung</p>
<p>Mfg Shade37337</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066386</guid><dc:creator><![CDATA[branleb]]></dc:creator><pubDate>Sat, 27 May 2006 20:12:07 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 20:13:03 GMT]]></title><description><![CDATA[<p>Und was ist der value_type der Map? Der muss immer angegeben sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066388</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Sat, 27 May 2006 20:13:03 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 20:59:08 GMT]]></title><description><![CDATA[<p>ein std::basic_string&lt;char_t&gt;<br />
siehe hier:</p>
<p>Shade37337 schrieb:</p>
<blockquote>
<p>//Z. 86<br />
typedef (std::map&lt; std::pair&lt; std::basic_string&lt;char_t&gt;, std::basic_string&lt;char_t&gt; &gt; &gt;::iterator) map_iter_t;</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1066406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066406</guid><dc:creator><![CDATA[branleb]]></dc:creator><pubDate>Sat, 27 May 2006 20:59:08 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 21:17:02 GMT]]></title><description><![CDATA[<p>Dann bitte:<br />
std::map&lt;std::pair&lt;std::basic_string&lt;char_t&gt;, std::basic_string&lt;char_t&gt; &gt;<strong>, std::basic_string&lt;char_t&gt;</strong> &gt;</p>
<p>Bitte auf Hinweise reagieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066413</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Sat, 27 May 2006 21:17:02 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 21:06:48 GMT]]></title><description><![CDATA[<p>waarum da bitte ohne prefix std:: ?</p>
<p>Mfg Shade37337</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066416</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066416</guid><dc:creator><![CDATA[branleb]]></dc:creator><pubDate>Sat, 27 May 2006 21:06:48 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit std::map und std::fstream on Sat, 27 May 2006 21:12:55 GMT]]></title><description><![CDATA[<p>aso..jetz erst gesehen...<br />
danke fürs aufmerksammachen...</p>
<p>Mfg Shade37337</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066418</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066418</guid><dc:creator><![CDATA[branleb]]></dc:creator><pubDate>Sat, 27 May 2006 21:12:55 GMT</pubDate></item></channel></rss>