<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2295578</guid>
        <pubDate>Mon, 22 Jun 2009 09:56:05 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2295578</link>
        <description><![CDATA[Alexandoros: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=275552&view=findpost&p=2294334'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>miksayer &#064; <time class="tag-quote__quoted-time" datetime="2009-06-20T15:12:43+04:00">20.06.09, 11:12</time></span><div class='quote '>Компилятор(VC++ 2008) ругается на объявление класса:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>d:&#092;мое&#092;programming&#092;viewer&#092;viewer&#092;src&#092;settings.h(5) : error C2011: Settings: переопределение типа &quot;class&quot;</div></div><br>
Что это значит? и что делать?</div></div><br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
Compiler Error C2011 <br>
Error Message<br>
&#39;identifier&#39; : &#39;type&#39; type redefinition<br>
The identifier was already defined as type. You may also get C2011 if you import a type library more than once into the same file. <br>
</div></div><br>
<br>
Выводы делай сам.<br>
<br>
Еще есть  #pragma once.]]></description>
        <author>Alexandoros</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294351</guid>
        <pubDate>Sat, 20 Jun 2009 11:51:45 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294351</link>
        <description><![CDATA[Flex Ferrum: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=275552&view=findpost&p=2294344'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>miksayer &#064; <time class="tag-quote__quoted-time" datetime="2009-06-20T11:29:25+00:00">20.06.09, 11:29</time></span><div class='quote '>Flex Ferrum, да не в этом проблема, как оказалось :)<br>
</div></div><br>
И в этом тоже, я думаю.]]></description>
        <author>Flex Ferrum</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294344</guid>
        <pubDate>Sat, 20 Jun 2009 11:29:25 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294344</link>
        <description><![CDATA[miksayer: блин, сколько раз уже на эти грабли наступал:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">#ifndef SETTINGS_INCLUDED</div><div class="code_line">#define SETTINGS_INCLUDED</div><div class="code_line">....</div><div class="code_line">#endif</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
отсюда и эта ошибка<br>
всем спасибо, вопрос решен <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2009-06-20T11:30:08+00:00">20.06.09, 11:30</time></span></span><br>
<strong class='tag-b'>Flex Ferrum</strong>, да не в этом проблема, как оказалось :) <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2009-06-20T11:30:37+00:00">20.06.09, 11:30</time></span></span><br>
т.е. я включал Settings.h в несколько файлов и такая вот фигня получилась]]></description>
        <author>miksayer</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294342</guid>
        <pubDate>Sat, 20 Jun 2009 11:25:50 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294342</link>
        <description><![CDATA[Flex Ferrum: <strong class='tag-b'>miksayer</strong>, запяточие перед #endif поставь. :)]]></description>
        <author>Flex Ferrum</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294339</guid>
        <pubDate>Sat, 20 Jun 2009 11:21:52 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294339</link>
        <description><![CDATA[miksayer: концовка pugixml.hpp:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;template &#60;typename Predicate&#62; inline xml_node xml_node::find_node(Predicate pred) const</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (!empty())</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (xml_node node = first_child(); node; node = node.next_sibling())</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (pred(node))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return node;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (node.first_child())</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xml_node found = node.find_node(pred);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (found) return found;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return xml_node();</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">#endif</div></ol></div></div></div></div><br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=275552&view=findpost&p=2294335'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Twilight &#064; <time class="tag-quote__quoted-time" datetime="2009-06-20T11:16:16+00:00">20.06.09, 11:16</time></span><div class='quote '>а компилятор так и пишет сообщения на русском?</div></div><br>
да, студия русская<br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=275552&view=findpost&p=2294335'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Twilight &#064; <time class="tag-quote__quoted-time" datetime="2009-06-20T11:16:16+00:00">20.06.09, 11:16</time></span><div class='quote '>скорее всего он имеет в виду - что Settings уже объявлен</div></div><br>
нет, это не так :)]]></description>
        <author>miksayer</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294338</guid>
        <pubDate>Sat, 20 Jun 2009 11:20:29 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294338</link>
        <description><![CDATA[kanes: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=275552&view=findpost&p=2294335'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>Twilight &#064; <time class="tag-quote__quoted-time" datetime="2009-06-20T11:16:16+00:00">20.06.09, 11:16</time></span><div class='quote '>а компилятор так и пишет сообщения на русском?</div></div><br>
Может и на руском писать в русской студии]]></description>
        <author>kanes</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294336</guid>
        <pubDate>Sat, 20 Jun 2009 11:19:19 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294336</link>
        <description><![CDATA[Flex Ferrum: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=275552&view=findpost&p=2294334'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>miksayer &#064; <time class="tag-quote__quoted-time" datetime="2009-06-20T11:12:43+00:00">20.06.09, 11:12</time></span><div class='quote '>Компилятор(VC++ 2008) ругается на объявление класса:</div></div><br>
концовку файла pugixml покажи, плз. :)]]></description>
        <author>Flex Ferrum</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294335</guid>
        <pubDate>Sat, 20 Jun 2009 11:16:16 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294335</link>
        <description><![CDATA[Twilight: а компилятор так и пишет сообщения на русском?<br>скорее всего он имеет в виду - что Settings уже объявлен]]></description>
        <author>Twilight</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294334</guid>
        <pubDate>Sat, 20 Jun 2009 11:12:43 +0000</pubDate>
        <title>переопределение типа &amp;quot;class&amp;quot;</title>
        <link>https://forum.sources.ru/index.php?showtopic=275552&amp;view=findpost&amp;p=2294334</link>
        <description><![CDATA[miksayer: Вот код:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">#include &#60;map&#62;</div><div class="code_line">#include &quot;pugixml.hpp&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">class Settings</div><div class="code_line">{</div><div class="code_line">public:</div><div class="code_line">&nbsp;&nbsp; &nbsp;void loadConfig(std::string filename) </div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;pugi::xml_document config;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;config.load_file(filename.c_str());</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (pugi::xml_node root = config.child(&quot;OiHotkeyConfig&quot;))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;loadFonts(root.child(&quot;Fonts&quot;));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;};</div><div class="code_line">&nbsp;&nbsp; &nbsp;HFONT getFont(std::wstring name) </div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return fonts[name];</div><div class="code_line">&nbsp;&nbsp; &nbsp;};</div><div class="code_line">private:</div><div class="code_line">&nbsp;&nbsp; &nbsp;std::map&#60;std::wstring, HFONT&#62; fonts;</div><div class="code_line">&nbsp;&nbsp; &nbsp;void loadFonts(pugi::xml_node fontsNode)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (fontsNode)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (pugi::xml_node font = fontsNode.child(&quot;Font&quot;); font; font = font.next_sibling())</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HFONT curFont = CreateFont(font.attribute(&quot;height&quot;).as_int(),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font.attribute(&quot;width&quot;).as_int(),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font.attribute(&quot;weight&quot;).as_int(),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font.attribute(&quot;italic&quot;).as_bool(),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font.attribute(&quot;underline&quot;).as_bool(),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font.attribute(&quot;strikeout&quot;).as_bool(),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFAULT_CHARSET,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUT_DEFAULT_PRECIS,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CLIP_DEFAULT_PRECIS,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFAULT_QUALITY,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFAULT_PITCH|FF_DONTCARE,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (LPCWSTR)font.attribute(&quot;face&quot;).value()</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fonts[pugi::as_utf16(font.attribute(&quot;name&quot;).value())]=curFont;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;};</div><div class="code_line">};</div></ol></div></div></div></div><br>
Компилятор(VC++ 2008) ругается на объявление класса:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>d:&#092;мое&#092;programming&#092;viewer&#092;viewer&#092;src&#092;settings.h(5) : error C2011: Settings: переопределение типа &quot;class&quot;</div></div><br>
Что это значит? и что делать?]]></description>
        <author>miksayer</author>
        <category>C/C++: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	