<?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=209769&amp;view=findpost&amp;p=1759085</guid>
        <pubDate>Fri, 09 Nov 2007 23:36:49 +0000</pubDate>
        <title>Проблема при компиляции</title>
        <link>https://forum.sources.ru/index.php?showtopic=209769&amp;view=findpost&amp;p=1759085</link>
        <description><![CDATA[artalex: <strong class='tag-b'>Dello</strong><br>
я бы как-нибудь так сделал<br>
<strong class='tag-b'>scientist.cpp</strong><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 &quot;scientist.h&quot;</div><div class="code_line">#include &#60;iostream&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">void scientist::getdata(){</div><div class="code_line">&nbsp;&nbsp; employee emp;</div><div class="code_line">&nbsp;&nbsp; emp.getdata();</div><div class="code_line">&nbsp;&nbsp; std::cout &#60;&#60; &quot;Vvedite 4islo publikaciy: &quot;; </div><div class="code_line">&nbsp;&nbsp; std::cin &#62;&#62; pubs;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">void scientist::putdata(){</div><div class="code_line">&nbsp;&nbsp; employee emp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; emp.putdata();</div><div class="code_line">&nbsp;&nbsp; std::cout &#60;&#60; &quot;\n4islo publikaciy: &quot; &#60;&#60; pubs;</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
<strong class='tag-b'>scientist.h</strong><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 scientist_h_</div><div class="code_line">#define scientist_h_</div><div class="code_line">&nbsp;</div><div class="code_line">#include &quot;employee.h&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">class scientist : public employee{</div><div class="code_line">&nbsp;&nbsp; private:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;int pubs; </div><div class="code_line">&nbsp;&nbsp; </div><div class="code_line">&nbsp;&nbsp; public:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void getdata(); &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void putdata();</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>
<strong class='tag-b'>employee.h</strong><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 employee_h_</div><div class="code_line">#define employee_h_</div><div class="code_line">&nbsp;</div><div class="code_line">class employee{</div><div class="code_line">&nbsp;&nbsp; private:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;char name[ 80 ]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;int years;</div><div class="code_line">&nbsp;&nbsp; </div><div class="code_line">&nbsp;&nbsp; public:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void getdata();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void putdata();</div><div class="code_line">};</div><div class="code_line">&nbsp;</div><div class="code_line">#endif</div></ol></div></div></div></div>]]></description>
        <author>artalex</author>
        <category>Кроссплатформенный C/C++: cl/gcc/Qt/Gtk+/WxWidgets</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=209769&amp;view=findpost&amp;p=1759007</guid>
        <pubDate>Fri, 09 Nov 2007 21:18:16 +0000</pubDate>
        <title>Проблема при компиляции</title>
        <link>https://forum.sources.ru/index.php?showtopic=209769&amp;view=findpost&amp;p=1759007</link>
        <description><![CDATA[Dello: О, запахало&#33; Спасибо&#33;<br><br>А в чем неверность, если не секрет?]]></description>
        <author>Dello</author>
        <category>Кроссплатформенный C/C++: cl/gcc/Qt/Gtk+/WxWidgets</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=209769&amp;view=findpost&amp;p=1759003</guid>
        <pubDate>Fri, 09 Nov 2007 21:12:33 +0000</pubDate>
        <title>Проблема при компиляции</title>
        <link>https://forum.sources.ru/index.php?showtopic=209769&amp;view=findpost&amp;p=1759003</link>
        <description><![CDATA[artalex: <strong class='tag-b'>Dello</strong><br>
а если приинклюдить employee.h перед scientist.h ?<br>
а вообще, неверный подход]]></description>
        <author>artalex</author>
        <category>Кроссплатформенный C/C++: cl/gcc/Qt/Gtk+/WxWidgets</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=209769&amp;view=findpost&amp;p=1758993</guid>
        <pubDate>Fri, 09 Nov 2007 21:04:29 +0000</pubDate>
        <title>Проблема при компиляции</title>
        <link>https://forum.sources.ru/index.php?showtopic=209769&amp;view=findpost&amp;p=1758993</link>
        <description><![CDATA[Dello: Собственно, при компиляции С++ - кода (на gcc-4.1.2) файла scientist.cpp выдается ошибка следующего содержания:<br>
<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">scientist.h:1: ошибка: expected class-name before &#39;{&#39; token</div></ol></div></div></div></div><br>
Содержимое:<br>
<br>
<strong class='tag-b'>scientist.cpp</strong><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;iostream&#62;</div><div class="code_line">#include &quot;scientist.h&quot;</div><div class="code_line">#include &quot;employee.h&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">void scientist::getdata()</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; using namespace std;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; employee emp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; emp.getdata();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; cout &#60;&#60; &quot;Vvedite 4islo publikaciy: &quot;; cin &#62;&#62; pubs;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;void scientist::putdata()</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; using namespace std;</div><div class="code_line">&nbsp;&nbsp; &nbsp; employee emp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; emp.putdata();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; cout &#60;&#60; &quot;\n4islo publikaciy: &quot; &#60;&#60; pubs;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div><br>
<br>
<strong class='tag-b'>scientist.h</strong><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">class scientist : public employee{</div><div class="code_line">&nbsp;&nbsp; private:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;int pubs; </div><div class="code_line">&nbsp;&nbsp; public:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void getdata(); &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void putdata();</div><div class="code_line">&nbsp;&nbsp; };</div></ol></div></div></div></div><br>
<br>
<br>
<strong class='tag-b'>employee.h</strong><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">class employee &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; {</div><div class="code_line">&nbsp;&nbsp; private:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;char name[ 80 ]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;int years;</div><div class="code_line">&nbsp;&nbsp; public:</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void getdata();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;void putdata();</div><div class="code_line">&nbsp;&nbsp; &nbsp;};</div></ol></div></div></div></div><br>
<br>
Не бейте меня, я чайнег. :)]]></description>
        <author>Dello</author>
        <category>Кроссплатформенный C/C++: cl/gcc/Qt/Gtk+/WxWidgets</category>
      </item>
	
      </channel>
      </rss>
	