<?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[compilier errors]]></title><description><![CDATA[<p>Hi <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="🙂"
    /><br />
Ich bekomme beim Compilieren im Codeblocks gleich 50 errors, obwohl ich nur ein total kleines Progrämmchen habe. Und seltsamerweise zu einer Datei, von der ich überhaupt nichts weiß <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>main.cpp:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include &quot;Automat.h&quot;

using namespace std;
int main(int argc, char *argv[])
{
   Automat autom;

   return EXIT_SUCCESS;
}
</code></pre>
<p>Automat.h (liegt im gleichen Verzeichnis wie main.cpp):</p>
<pre><code>#ifndef AUTOMAT_H
#define AUTOMAT_H

class Automat
{
    public:
        Automat();
        virtual ~Automat();
    protected:
    private:
};

#endif // AUTOMAT_H
</code></pre>
<p>Automat.cpp (ebenfalls im gleichen Verzeichnis wie main.cpp):</p>
<pre><code>#include &quot;Automat.h&quot;

Automat::Automat()
{
    //ctor
}

Automat::~Automat()
{
    //dtor
}
</code></pre>
<p>Beim Anlegen der Klasse Automat habe ich mich ganz auf CodeBlocks verlassen. Das kann selbst das Grundgerüst für Klassen anlegen.</p>
<p>Aber jetzt bekomm ich uuuuunmengen an errors. Seltsamerweise zu einer Datei locale.h <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<blockquote>
<p>c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\250' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '`' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\6' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\24' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\376' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\5' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\340' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\310' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\31' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\34' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\6' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\7' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\10' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\250' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\32' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\360' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\200' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\330' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\360' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\330' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\4' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\200' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\4' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\6' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\330' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
||More errors follow but not being shown.|<br />
||Edit the max errors limit in compiler options...|<br />
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 24 second(s)) ===|</p>
</blockquote>
<p>Woher kommt denn dieses locale.h? Und diese Nummern sollen für Fehler stehen??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/323629/compilier-errors</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 08:31:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/323629.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Feb 2014 09:44:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 09:48:16 GMT]]></title><description><![CDATA[<p>Hi <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="🙂"
    /><br />
Ich bekomme beim Compilieren im Codeblocks gleich 50 errors, obwohl ich nur ein total kleines Progrämmchen habe. Und seltsamerweise zu einer Datei, von der ich überhaupt nichts weiß <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>main.cpp:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include &quot;Automat.h&quot;

using namespace std;
int main(int argc, char *argv[])
{
   Automat autom;

   return EXIT_SUCCESS;
}
</code></pre>
<p>Automat.h (liegt im gleichen Verzeichnis wie main.cpp):</p>
<pre><code>#ifndef AUTOMAT_H
#define AUTOMAT_H

class Automat
{
    public:
        Automat();
        virtual ~Automat();
    protected:
    private:
};

#endif // AUTOMAT_H
</code></pre>
<p>Automat.cpp (ebenfalls im gleichen Verzeichnis wie main.cpp):</p>
<pre><code>#include &quot;Automat.h&quot;

Automat::Automat()
{
    //ctor
}

Automat::~Automat()
{
    //dtor
}
</code></pre>
<p>Beim Anlegen der Klasse Automat habe ich mich ganz auf CodeBlocks verlassen. Das kann selbst das Grundgerüst für Klassen anlegen.</p>
<p>Aber jetzt bekomm ich uuuuunmengen an errors. Seltsamerweise zu einer Datei locale.h <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<blockquote>
<p>c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\250' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '`' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\6' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\24' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\376' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\5' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\340' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\310' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\31' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\34' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\6' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\7' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\10' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\250' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|1|error: stray '\32' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\360' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\200' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\330' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\360' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\330' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\20' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\4' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\200' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\4' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\1' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\6' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\330' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
c:\programme\codeblocks\mingw\include\locale.h|2|error: stray '\377' in program|<br />
||More errors follow but not being shown.|<br />
||Edit the max errors limit in compiler options...|<br />
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 24 second(s)) ===|</p>
</blockquote>
<p>Woher kommt denn dieses locale.h? Und diese Nummern sollen für Fehler stehen??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382147</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382147</guid><dc:creator><![CDATA[tröröö]]></dc:creator><pubDate>Sat, 08 Feb 2014 09:48:16 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 10:31:35 GMT]]></title><description><![CDATA[<p>OMG</p>
<p>Ich glaube, CodeBlocks ist für die Tonne.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382149</guid><dc:creator><![CDATA[tröröö]]></dc:creator><pubDate>Sat, 08 Feb 2014 10:31:35 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 10:58:35 GMT]]></title><description><![CDATA[<p>Jetzt habe ich CodeBlocks deinstalliert, neu heruntergeladen und neu installiert. Die oben gezeigten Fehlermeldungen waren dann weg, funktioniert hat es trotzdem nicht.</p>
<p>Danach habe ich versucht, ein fertiges Programm zu kompilieren. Ein Programm zum Buch &quot;Grundkurs C++&quot; (gibts aus dem Internet zu laden). Das Programm schaut folgendermaßen aus:</p>
<p>main.cpp:</p>
<pre><code>// listings/006/automat1/main.cpp
#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;string&gt;
#include &lt;memory&gt;   // C++11
#include &quot;automat.h&quot;
using namespace std;

int main(void) {
  unique_ptr&lt;Automat&gt; device_ptr(new Automat); // C++11
  vector &lt;Automat&gt; Vdevice(2);
  Automat device;
  // Initialisieren
  device_ptr-&gt;init(10000, &quot;Bonn, Hauptstrasse 123&quot;);

  Vdevice[0].init(20000, &quot;Augsburg, Fuggerweg 345&quot;);
  Vdevice[1].set_geld(25000);
  Vdevice[1].set_standort(&quot;Berlin, Berliner Allee 567&quot;);

  device.init(123456, &quot;Frankfurt, Goethestrasse 123&quot;);

  // Ausgabe
  cout &lt;&lt; device_ptr-&gt;get_geld() &lt;&lt; endl;
  cout &lt;&lt; device_ptr-&gt;get_standort() &lt;&lt; endl;

  for(size_t i=0; i&lt;Vdevice.size(); i++) {
    cout &lt;&lt; Vdevice[i].get_geld() &lt;&lt; endl;
    cout &lt;&lt; Vdevice[i].get_standort() &lt;&lt; endl;
  }

  cout &lt;&lt; device.get_geld() &lt;&lt; endl;
  cout &lt;&lt; device.get_standort() &lt;&lt; endl;
  return 0;
}
</code></pre>
<p>automat.h:</p>
<pre><code>// listings/006/automat.h
#ifndef _AUTOMAT_H_
#define _AUTOMAT_H_
#include &lt;string&gt;
using namespace std;

class Automat {
  private:
    // Daten der Klasse &quot;Automat&quot;
    unsigned long geld{0UL}; // C++11
    string standort{&quot;Unbekannt&quot;};  // C++11
  public:
    // Elementfunktionen der Klasse &quot;Automat&quot;
    unsigned long get_geld();
    void set_geld(unsigned long g);
    string&amp; get_standort();
    void set_standort(string s);
    void init(unsigned long g, string s);
};
#endif
</code></pre>
<p>automat.cpp:</p>
<pre><code>#include &lt;string&gt;
#include &quot;automat.h&quot;
using namespace std;

unsigned long Automat::get_geld() {
  return geld;
}

void Automat::set_geld(unsigned long g){
  geld = g;
}

string&amp; Automat::get_standort() {
  return standort;
}

void Automat::set_standort(string s){
  standort = s;
}

void Automat::init(unsigned long g=0, string s=&quot;&quot;) {
  set_geld(g);
  set_standort(s);
}
</code></pre>
<p>Jetzt hat CodeBlocks Probleme mit dem Erkennen von Methoden:</p>
<blockquote>
<p>C:\cpp\beispiele\2294_listings\1547_listings\006\automat1\C++11\main.o:main.cpp|| undefined reference to <code>Automat::init(unsigned long, std::string)'| C:\\cpp\\beispiele\\2294\_listings\\1547\_listings\\006\\automat1\\C++11\\main.o:main.cpp|| undefined reference to</code>Automat::init(unsigned long, std::string)'|<br />
C:\cpp\beispiele\2294_listings\1547_listings\006\automat1\C++11\main.o:main.cpp|| undefined reference to <code>Automat::set_geld(unsigned long)'| C:\\cpp\\beispiele\\2294\_listings\\1547\_listings\\006\\automat1\\C++11\\main.o:main.cpp|| undefined reference to</code>Automat::set_standort(std::string)'|<br />
C:\cpp\beispiele\2294_listings\1547_listings\006\automat1\C++11\main.o:main.cpp|| undefined reference to <code>Automat::init(unsigned long, std::string)'| C:\\cpp\\beispiele\\2294\_listings\\1547\_listings\\006\\automat1\\C++11\\main.o:main.cpp|| undefined reference to</code>Automat::get_geld()'|<br />
C:\cpp\beispiele\2294_listings\1547_listings\006\automat1\C++11\main.o:main.cpp|| undefined reference to <code>Automat::get_standort()'| C:\\cpp\\beispiele\\2294\_listings\\1547\_listings\\006\\automat1\\C++11\\main.o:main.cpp|| undefined reference to</code>Automat::get_geld()'|<br />
C:\cpp\beispiele\2294_listings\1547_listings\006\automat1\C++11\main.o:main.cpp|| undefined reference to <code>Automat::get_standort()'| C:\\cpp\\beispiele\\2294\_listings\\1547\_listings\\006\\automat1\\C++11\\main.o:main.cpp|| undefined reference to</code>Automat::get_geld()'|<br />
C:\cpp\beispiele\2294_listings\1547_listings\006\automat1\C++11\main.o:main.cpp|| undefined reference to `Automat::get_standort()'|<br />
||=== Build failed: 11 error(s), 0 warning(s) (0 minute(s), 22 second(s)) ===|</p>
</blockquote>
<p>Habt ihr eine Idee dazu, was hier schief läuft?</p>
<p>Muss ich dazu noch irgendetwas im CodeBlocks konfigurieren? Oder müss ich im CodeBlocks ein Projekt dazu anlegen? Momentan sind das nämlich 3 ganz normale Dateien, die irgendwo auf der Festplatte liegen (allerdings alle in einem gemeinsamen Ordner).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382152</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382152</guid><dc:creator><![CDATA[tröröö]]></dc:creator><pubDate>Sat, 08 Feb 2014 10:58:35 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 11:02:19 GMT]]></title><description><![CDATA[<p>Du musst automat.cpp zum Projekt hinzuzufügen, dann wird das von Code::Blocks auch kompiliert und gelinkt.</p>
<p>Und ich hoffe, das using namespace im Header und die Defaultargumente in der .cpp-Datei hast du dazu gebaut und waren nicht schon im Original vorhanden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382153</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382153</guid><dc:creator><![CDATA[asdf9]]></dc:creator><pubDate>Sat, 08 Feb 2014 11:02:19 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 11:19:27 GMT]]></title><description><![CDATA[<pre><code>Und ich hoffe, das using namespace im Header und die Defaultargumente in der .cpp-Datei hast du dazu gebaut und waren nicht schon im Original vorhanden.
</code></pre>
<p>Habe nichts am Code geändert.</p>
<p>Juhu. Hat geklappt <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>
<blockquote>
<p>das using namespace im Header</p>
</blockquote>
<p>Kommentiere ich im automat.h die Zeile 5 aus, bekomme ich jedoch wieder einen Fehler in der Zeile 11 angezeigt:</p>
<blockquote>
<p>||=== Build: Debug in p1 (compiler: GNU GCC Compiler) ===|<br />
include\automat.h|11|error: 'string' does not name a type|<br />
include\automat.h|16|error: 'string' does not name a type|<br />
include\automat.h|17|error: 'string' has not been declared|<br />
include\automat.h|18|error: 'string' has not been declared|<br />
C:\cpp\p1\main.cpp||In function 'int main()':|<br />
C:\cpp\p1\main.cpp|14|error: invalid conversion from 'const char*' to 'int' [-fpermissive]|<br />
include\automat.h|18|error: initializing argument 2 of 'void Automat::init(long unsigned int, int)' [-fpermissive]|<br />
C:\cpp\p1\main.cpp|16|error: invalid conversion from 'const char*' to 'int' [-fpermissive]|<br />
include\automat.h|18|error: initializing argument 2 of 'void Automat::init(long unsigned int, int)' [-fpermissive]|<br />
C:\cpp\p1\main.cpp|18|error: invalid conversion from 'const char*' to 'int' [-fpermissive]|<br />
include\automat.h|17|error: initializing argument 1 of 'void Automat::set_standort(int)' [-fpermissive]|<br />
C:\cpp\p1\main.cpp|20|error: invalid conversion from 'const char*' to 'int' [-fpermissive]|<br />
include\automat.h|18|error: initializing argument 2 of 'void Automat::init(long unsigned int, int)' [-fpermissive]|<br />
C:\cpp\p1\main.cpp|24|error: 'class Automat' has no member named 'get_standort'|<br />
C:\cpp\p1\main.cpp|28|error: '__gnu_cxx::__alloc_traits&lt;std::allocator&lt;Automat&gt; &gt;::value_type' has no member named 'get_standort'|<br />
C:\cpp\p1\main.cpp|32|error: 'class Automat' has no member named 'get_standort'|<br />
||=== Build failed: 15 error(s), 0 warning(s) (0 minute(s), 22 second(s)) ===|</p>
</blockquote>
<p>Scheint also benötigt zu werden.</p>
<blockquote>
<p>Defaultargumente in der .cpp-Datei</p>
</blockquote>
<p>Meinst du die Zeile 21 in automat.cpp?</p>
<pre><code>void Automat::init(unsigned long g=0, string s=&quot;&quot;) {
</code></pre>
<p>Was stört dich denn daran?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382154</guid><dc:creator><![CDATA[tröröö]]></dc:creator><pubDate>Sat, 08 Feb 2014 11:19:27 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 11:17:29 GMT]]></title><description><![CDATA[<p>tröröö schrieb:</p>
<blockquote>
<p>Ein Programm zum Buch &quot;Grundkurs C++&quot;</p>
</blockquote>
<p>Das ist von Jürgen Wolf.</p>
<p>Mach um alles wo 'Jürgen Wolf' draufsteht einen großen Bogen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382157</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382157</guid><dc:creator><![CDATA[Caligulaminus]]></dc:creator><pubDate>Sat, 08 Feb 2014 11:17:29 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 12:06:43 GMT]]></title><description><![CDATA[<p>tröröö schrieb:</p>
<blockquote>
<blockquote>
<p>das using namespace im Header</p>
</blockquote>
<p>Kommentiere ich im automat.h die Zeile 5 aus, bekomme ich jedoch wieder einen Fehler in der Zeile 11 angezeigt:<br />
[...]<br />
Scheint also benötigt zu werden.</p>
</blockquote>
<p>Du musst das kompensieren, indem du alle Namen aus dem std-Namespace mit dem Präfix std:: versiehst. string --&gt; std::string. Nur im Header natürlich.</p>
<p>Der Grund ist, dass das Einbinden eines Headers, der einen Namenspace öffnet, in eine Quelldatei dazu führt, dass der Namespace auch in der Quelldatei geöffnet ist, ob man das will oder nicht. Deshalb die Regel: Kein using namespace in Headern.</p>
<p>Achja, und besorg dir beizeiten ein besseres Buch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382163</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382163</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Sat, 08 Feb 2014 12:06:43 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sat, 08 Feb 2014 12:33:11 GMT]]></title><description><![CDATA[<p>Bashar schrieb:</p>
<blockquote>
<p>Achja, und besorg dir beizeiten ein besseres Buch.</p>
</blockquote>
<p>Streich das beizeiten. Im Prinzip sofort neues besorgen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382165</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382165</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Sat, 08 Feb 2014 12:33:11 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sun, 09 Feb 2014 09:11:15 GMT]]></title><description><![CDATA[<blockquote>
<p>Der Grund ist, dass das Einbinden eines Headers, der einen Namenspace öffnet, in eine Quelldatei dazu führt, dass der Namespace auch in der Quelldatei geöffnet ist, ob man das will oder nicht. Deshalb die Regel: Kein using namespace in Headern.</p>
</blockquote>
<p>Wenn es die gleichen Namespaces sind, sollte das doch kein Problem geben, oder? Könntest mir bitte ein Bsp zeigen, wo das Programm dann einen Fehler liefert?</p>
<blockquote>
<p>Streich das beizeiten. Im Prinzip sofort neues besorgen!</p>
</blockquote>
<p>Kennst du zufällig ein kostengünstiges, gutes Buch für Anfänger?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382261</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382261</guid><dc:creator><![CDATA[tröröö]]></dc:creator><pubDate>Sun, 09 Feb 2014 09:11:15 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sun, 09 Feb 2014 10:53:16 GMT]]></title><description><![CDATA[<p>tröröö schrieb:</p>
<blockquote>
<p>Ich glaube, CodeBlocks ist für die Tonne.</p>
</blockquote>
<p>Ganz im Gegenteil. Ich halte den von Microsoft fürn Anfang für ein wenig angenehmer, ausführlichere (deutsche) Fehlermeldungen (C1234 markieren und F1 drücken). Danach kommt gleich CodeBlocks.</p>
<p>Aber CodeBlocks kann nix dafür, wenn Du die c:\programme\codeblocks\mingw\include\locale.h kaputtmachst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382288</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382288</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sun, 09 Feb 2014 10:53:16 GMT</pubDate></item><item><title><![CDATA[Reply to compilier errors on Sun, 09 Feb 2014 12:32:11 GMT]]></title><description><![CDATA[<blockquote>
<p>Aber CodeBlocks kann nix dafür, wenn Du die c:\programme\codeblocks\mingw\include\locale.h kaputtmachst.</p>
</blockquote>
<p>Ich weiß noch nicht mal, was dieses locale.h ist. Und hab auch keine Ahnung, wie ich es hätte kaputt machen können.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2382311</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2382311</guid><dc:creator><![CDATA[tröröö]]></dc:creator><pubDate>Sun, 09 Feb 2014 12:32:11 GMT</pubDate></item></channel></rss>