<?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[Umlaute-Programm]]></title><description><![CDATA[<p>Hi,<br />
ich muss ein Programm schreiben, das aus einer geschriebenen Textdatei, die Umlaute in normale Buchstaben umwandelt (also ä in ae, ü in ue, usw...). Bekomm dat aber irgendwie net auf die Reihe, die Textdatei auslesen zu lassen. Ich hab schon überall gesucht, komme aber net klar. (Würde mich auch über fertige Programme freuen)</p>
<p>Thx im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/124328/umlaute-programm</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 15:56:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124328.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Oct 2005 14:51:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Umlaute-Programm on Wed, 26 Oct 2005 14:51:23 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich muss ein Programm schreiben, das aus einer geschriebenen Textdatei, die Umlaute in normale Buchstaben umwandelt (also ä in ae, ü in ue, usw...). Bekomm dat aber irgendwie net auf die Reihe, die Textdatei auslesen zu lassen. Ich hab schon überall gesucht, komme aber net klar. (Würde mich auch über fertige Programme freuen)</p>
<p>Thx im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901246</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901246</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Wed, 26 Oct 2005 14:51:23 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Wed, 26 Oct 2005 15:03:34 GMT]]></title><description><![CDATA[<p>Hallo,<br />
hast du <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39469.html" rel="nofollow">das</a> schon gelesen?<br />
Wenn ja, was genau ist unklar?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901251</guid><dc:creator><![CDATA[HumeSikkins]]></dc:creator><pubDate>Wed, 26 Oct 2005 15:03:34 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 09:32:34 GMT]]></title><description><![CDATA[<p>Also ich sollte wohl erstmal dazu sagen, das ich im Programieren ein absoluter Newbee bin. Ich hatte erst ein paar Stunden Programieren in der Schule (so ganz billig, mit &quot;Hallo Welt&quot; und so). Jetzt hab ich aber Praktikum und soll das als Aufgabe machen. Nee, das hatte ich noch nicht gelesen, hab's auch soweit geschafft, die Datei einlesen zu lassen, jetzt häng ich, das die Umlaute gesucht und umgewandelt werden.</p>
<pre><code class="language-cpp">int main () {
  char buffer[256];
  ifstream examplefile (&quot;E:\\Dokumente und Einstellungen\\Administrator\\Desktop\\Test\\datei.txt&quot;);
  if (! examplefile.is_open())
  { cout &lt;&lt; &quot;Error opening file&quot;;
  getch();
  }

  while (! examplefile.eof() )
  {
  vector&lt;string&gt; Contents;
  for (string ReadString; getline(examplefile, ReadString); )
        Contents.push_back(ReadString);

        \\Was muss jetzt hier hin?

        ostream_iterator&lt;string&gt; Out(cout, &quot;\n&quot;);
        copy(Contents.begin(), Contents.end(), Out);
        getch();

  }
  return 0;
}
</code></pre>
<p>Ach und danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901772</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901772</guid><dc:creator><![CDATA[Solid Snake]]></dc:creator><pubDate>Thu, 27 Oct 2005 09:32:34 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 09:45:07 GMT]]></title><description><![CDATA[<p>Erstmal würde ich den vector an der Stelle weglassen (sonst gibt das Programm für jede Zeile den kompletten bisherigen Text aus.</p>
<p>Und zweitens: versuch' mal string::find() (zum aufspüren der Umlaute) und string::replace() (zum Ersetzen gegen &quot;ae&quot; etc)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901781</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901781</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 27 Oct 2005 09:45:07 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 09:53:46 GMT]]></title><description><![CDATA[<p>Was genau meinst du das mit vector weglassen? (Also wie gesagt, ich bin ein absoluter Newbee). Und bei sting::find (ä) meckert er rum, das ä ein ungültiges char Zeichen ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901787</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901787</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 09:53:46 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 09:55:11 GMT]]></title><description><![CDATA[<p>Ich mein natürlich string::find (ä);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901791</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901791</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 09:55:11 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 10:10:51 GMT]]></title><description><![CDATA[<p>SolidSnake schrieb:</p>
<blockquote>
<p>Was genau meinst du das mit vector weglassen? (Also wie gesagt, ich bin ein absoluter Newbee).</p>
</blockquote>
<p>So, wie das Programm jetzt dasteht, würde es aus dem Text:</p>
<pre><code>Dies ist ein Test
Der Test geht weiter
Und wir testen immer noch
</code></pre>
<p>das da machen:</p>
<pre><code>Dies ist ein Test
Dies ist ein Test
Der Test geht weiter
Dies ist ein Test
Der Test geht weiter
Und wir testen immer noch
</code></pre>
<p>(Du hängst am Anfang der Schleife die aktuelle Eingabe an den Vektor an und gibst am Ende dessen kompletten Inhalt aus)</p>
<p>Bessere Lösung:</p>
<pre><code class="language-cpp">for (string ReadString; getline(examplefile, ReadString); )

        \\Was muss jetzt hier hin?

        cout&lt;&lt;ReadString&lt;&lt;endl;
        getch();
}
</code></pre>
<p>(oder setz die Ausgabe hinter die for()-Schleife)</p>
<blockquote>
<p>Und bei sting::find (ä) meckert er rum, das ä ein ungültiges char Zeichen ist.</p>
</blockquote>
<p>Das liegt daran, daß Zeichen-Konstanten in '' eingeschlossen werden sollten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/901798</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901798</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 27 Oct 2005 10:10:51 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 10:18:39 GMT]]></title><description><![CDATA[<p>Ok, danke. Aber wenn ich das in (&quot;&quot;) setzte, sagt er das er keine Übereinstimmung gefunden hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901808</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901808</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 10:18:39 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 10:23:17 GMT]]></title><description><![CDATA[<p>Aber der Text ist: &quot;Das ist ein Täst&quot;. Was mache ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901814</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 10:23:17 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 10:28:38 GMT]]></title><description><![CDATA[<p>SolidSnake schrieb:</p>
<blockquote>
<p>Aber der Text ist: &quot;Das ist ein Täst&quot;. Was mache ich falsch?</p>
</blockquote>
<p>Stimmt dein Aufruf des replace algos? (<a href="http://www.cppreference.com/cppalgorithm/replace.html" rel="nofollow">http://www.cppreference.com/cppalgorithm/replace.html</a>)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901818</guid><dc:creator><![CDATA[GPC]]></dc:creator><pubDate>Thu, 27 Oct 2005 10:28:38 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 10:33:05 GMT]]></title><description><![CDATA[<p>Mach mal die Probe:</p>
<pre><code class="language-cpp">string test=&quot;Dies ist ein Täst&quot;;
cout&lt;&lt;test.find('ä')&lt;&lt;&quot;:&quot;&lt;&lt;test;
</code></pre>
<p>das sollte eigentlich 13 zurückliefern.</p>
<p>(Was noch sein könnte: die Umlaute werden unter ANSI (Windows) und ASCII (DOS/C) anders dargestellt)</p>
<p>Edit <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/6287">@GPC</a>: Unterscheide bitte den replace()-Algorithmus und <a href="http://www.cppreference.com/cppstring/replace.html" rel="nofollow">string::replace()</a> (ersterer wird hier nicht anwendbar sein, weil du ein Zeichen ('ä') gegen mehrere (&quot;ae&quot;) austeuschen willst).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901819</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 27 Oct 2005 10:33:05 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 10:39:42 GMT]]></title><description><![CDATA[<p>Stimmt dein Aufruf des replace algos?<br />
Was meinst du damit?</p>
<p>Beim Test gibt er mir 14:Das ist ein Töst</p>
<p>So sieht mein Programm jetzt aus</p>
<pre><code class="language-cpp">int main () {
  char buffer[256];
  ifstream examplefile (&quot;E:\\Dokumente und Einstellungen\\Administrator\\Desktop\\Test\\datei.txt&quot;);
  if (! examplefile.is_open())
  { cout &lt;&lt; &quot;Error opening file&quot;;
  getch();
  }

  while (! examplefile.eof() )
  {

  for (string ReadString; getline(examplefile, ReadString); ) 

         string::find (&quot;ä&quot;);
         string::replace (&quot;ae&quot;);

        cout&lt;&lt;ReadString&lt;&lt;endl; 
        getch();
}

  return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/901822</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901822</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 10:39:42 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 11:09:18 GMT]]></title><description><![CDATA[<p>Der Aufruf kann so nicht funktionieren, string merkt sich die Suchposition nicht intern für weitere Arbeiten:</p>
<pre><code class="language-cpp">size_type pos;
while((pos=ReadString.find('ä'))!=npos)
  ReadString.replace(pos,1,&quot;ae&quot;);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/901837</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901837</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 27 Oct 2005 11:09:18 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 11:41:04 GMT]]></title><description><![CDATA[<blockquote>
<p>Edit <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/6287">@GPC</a>: Unterscheide bitte den replace()-Algorithmus und string::replace() (ersterer wird hier nicht anwendbar sein, weil du ein Zeichen ('ä') gegen mehrere (&quot;ae&quot;) austeuschen willst).</p>
</blockquote>
<p>Hatte ich wohl übersehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901866</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901866</guid><dc:creator><![CDATA[GPC]]></dc:creator><pubDate>Thu, 27 Oct 2005 11:41:04 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 13:25:24 GMT]]></title><description><![CDATA[<p>So, bin wieder da. Durfte den Keller aufräumen.</p>
<p>CStoll schrieb:</p>
<blockquote>
<p>Der Aufruf kann so nicht funktionieren, string merkt sich die Suchposition nicht intern für weitere Arbeiten:</p>
<pre><code class="language-cpp">size_type pos;
while((pos=ReadString.find('ä'))!=npos)
  ReadString.replace(pos,1,&quot;ae&quot;);
</code></pre>
</blockquote>
<p>Wie meinst du das? Wenn ich das reinschreibe, meckert er &quot;undifiniertest Symbol 'size_type'.</p>
<p>Also wie mach ich das jetzt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901950</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901950</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 13:25:24 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 13:29:39 GMT]]></title><description><![CDATA[<p>ups - das heißt natürlich &quot;string::size_type&quot; (und - ehe du den nächsten Fehler anmeldest - &quot;string::npos&quot;).</p>
<p>Du merkst dir in pos die letzte Fundstelle des Umlautes und ersetzt dann dieses Zeichen durch den entsprechenden Austauschtext.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901954</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901954</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 27 Oct 2005 13:29:39 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 13:40:50 GMT]]></title><description><![CDATA[<p>Da is wohl immer noch was falsch (oder ich mach immer noch was falsch). Jetzt sagt er :<br />
[C++ Fehler] Test3.cpp(32): E2451 Undefiniertes Symbol 'pos'<br />
[C++ Fehler] Test3.cpp(32): E2108 Ungültige Verwendung von typedef 'string'<br />
[C++ Fehler] Test3.cpp(32): E2293 ) erwartet<br />
[C++ Fehler] Test3.cpp(33): E2377 In While-Anweisung fehlt )<br />
[C++ Fehler] Test3.cpp(35): E2451 Undefiniertes Symbol 'ReadString'<br />
[C++ Fehler] Test3.cpp(40): E2040 Deklaration nicht ordnungsgemäß abgeschlossen<br />
[C++ Fehler] Test3.cpp(41): E2190 Unerwartetes }</p>
<pre><code class="language-cpp">int main () {
  char buffer[256];
  ifstream examplefile (&quot;E:\\Dokumente und Einstellungen\\Administrator\\Desktop\\Test\\datei.txt&quot;);
  if (! examplefile.is_open())
  { cout &lt;&lt; &quot;Error opening file&quot;;
  getch();
  }

  while (! examplefile.eof() )
  {

  for (string ReadString; getline(examplefile, ReadString); )

        string::size_type pos;
  while((pos=ReadString.find('ä'))!=string::npos)
  ReadString.replace(pos,1,&quot;ae&quot;);

        cout&lt;&lt;ReadString&lt;&lt;endl;
        getch();
}
}

  return 0;
}
</code></pre>
<p>Also, was hab ich falsch gemacht? Ist das richtig eingesetzt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901967</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 13:40:50 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 13:47:01 GMT]]></title><description><![CDATA[<p>vielleicht solltest du hinter das for() auch eine { Klammer machen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> (sonst wiederholt die nur die Variablendeklaration bis zum Dateiende)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901974</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901974</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 27 Oct 2005 13:47:01 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 13:49:38 GMT]]></title><description><![CDATA[<p>Perfekt! Es funktioniert!! Jetzt muss ich nur noch die anderen Umlaute auch noch dazufügen. Aber dat versuch ich grad erstmal so. Vielen Dank!!! Warst mir echt ne große Hilfe!!!! <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="🙂"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/901978</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901978</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 13:49:38 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 14:31:13 GMT]]></title><description><![CDATA[<p>So, hab das auch mit den anderen Umlauten geschafft. Jetzt wollte ich aber, das es vorher fragt, welche Datei gelesen wird. Und habe folgendes gemacht:</p>
<pre><code class="language-cpp">int main () {
  char buffer[256];
  int datei;
  cout&lt;&lt;&quot;Bitte Dateipfad angeben\n&quot;;
  cout&lt;&lt;&quot;Dateipfad:&quot;;
  cin&gt;&gt;&quot;datei&quot;;
  ifstream examplefile (&quot;datei&quot;);
  if (! examplefile.is_open())
  { cout &lt;&lt; &quot;Error opening file&quot;;
  getch();
  exit(1);
  }

  while (! examplefile.eof() )
  {

  for (string ReadString; getline(examplefile, ReadString); ) {

  string::size_type pos;
  while((pos=ReadString.find('ä'))!=string::npos)
  ReadString.replace(pos,1,&quot;ae&quot;);

  while((pos=ReadString.find('ü'))!=string::npos)
  ReadString.replace(pos,1,&quot;ue&quot;);

  while((pos=ReadString.find('ö'))!=string::npos)
  ReadString.replace(pos,1,&quot;oe&quot;);

  while((pos=ReadString.find('ß'))!=string::npos)
  ReadString.replace(pos,1,&quot;ss&quot;);

  while((pos=ReadString.find('Ü'))!=string::npos)
  ReadString.replace(pos,1,&quot;Ue&quot;);

  while((pos=ReadString.find('Ä'))!=string::npos)
  ReadString.replace(pos,1,&quot;Ae&quot;);

  while((pos=ReadString.find('Ö'))!=string::npos)
  ReadString.replace(pos,1,&quot;öe&quot;);

  cout&lt;&lt;ReadString&lt;&lt;endl;
        getch();
}
}

  return 0;
}
</code></pre>
<p>Wenn ich aber dann einen Pfad angebe, sagt er &quot;Error opening file&quot; (Also in der Konsole).<br />
Ich hab es auch schonmal so gemacht:&quot;ifstream examplefile (datei);&quot;.<br />
Dann sagt er es nicht, schreibt aber nur &quot;u.txt&quot; an. Also, was ist falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/902024</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902024</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 14:31:13 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 14:36:04 GMT]]></title><description><![CDATA[<p>SolidSnake schrieb:</p>
<blockquote>
<pre><code class="language-cpp">char buffer[256];
  int datei;
  cout&lt;&lt;&quot;Bitte Dateipfad angeben\n&quot;;
  cout&lt;&lt;&quot;Dateipfad:&quot;;
  cin&gt;&gt;&quot;datei&quot;;
  ifstream examplefile (&quot;datei&quot;);
</code></pre>
</blockquote>
<p>Das kann so auch nicht ganz funktionieren - wenn du &quot;datei&quot; angibst, nimmt er genau diese Zeichenfolge als Dateiname. Du mußt den Namen in einem String einlesen und dann die Variable angeben:</p>
<pre><code class="language-cpp">string dateiname;
cout &lt;&lt; &quot;Bitte Pfad angeben:&quot;;
cin &gt;&gt; dateiname;
ifstream examplefile(dateiname);//eventuell brauchst du auch ifstream examplefile(dateiname.c_str());
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/902031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902031</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 27 Oct 2005 14:36:04 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 14:42:36 GMT]]></title><description><![CDATA[<p>Ok. Jetzt klappt's! Vielen Dank nochma! Noch ne Frage: Gibt es eine Möglichkeit, das sofort der ganze Inhalt der Datei angezeigt wird, nich nur Zeilenweise?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/902035</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902035</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 14:42:36 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Thu, 27 Oct 2005 19:04:24 GMT]]></title><description><![CDATA[<p>Ich hab alles soweit hinbekommen. Nur hatte ich mir das von meiner Praktikumsstelle auch nach Hause geschickt (per E-Mail) und jetzt funtzt es net mehr (also es kommt in der Konsole immer &quot;Error ...&quot;, ich kann halt keine Datei öffnen). Macht es ein Unterschied wenn ich das mit Borland Builder 6 oder Borland Builder 6 Enterprise öffne? Ich kopier hier noch mal das ganze Programm rein, vielleicht is ja irgendwie was falsch.</p>
<pre><code class="language-cpp">int main () {
  char buffer[256];
  string dateiname;
  cout&lt;&lt;&quot;Bitte Dateipfad angeben\n&quot;;
  cout&lt;&lt;&quot;Dateipfad:&quot;;
  cin&gt;&gt;dateiname;
  ifstream examplefile (dateiname.c_str());
  if (! examplefile.is_open())
  { cout &lt;&lt; &quot;Error opening file&quot;;
  getch();
  exit(1);
  }

  while (! examplefile.eof() )
  {

  for (string ReadString; getline(examplefile, ReadString); ) {

  string::size_type pos;
  while((pos=ReadString.find('ä'))!=string::npos)
  ReadString.replace(pos,1,&quot;ae&quot;);

  while((pos=ReadString.find('ü'))!=string::npos)
  ReadString.replace(pos,1,&quot;ue&quot;);

  while((pos=ReadString.find('ö'))!=string::npos)
  ReadString.replace(pos,1,&quot;oe&quot;);

  while((pos=ReadString.find('ß'))!=string::npos)
  ReadString.replace(pos,1,&quot;ss&quot;);

  while((pos=ReadString.find('Ü'))!=string::npos)
  ReadString.replace(pos,1,&quot;Ue&quot;);

  while((pos=ReadString.find('Ä'))!=string::npos)
  ReadString.replace(pos,1,&quot;Ae&quot;);

  while((pos=ReadString.find('Ö'))!=string::npos)
  ReadString.replace(pos,1,&quot;öe&quot;);

  cout&lt;&lt;ReadString&lt;&lt;endl;
        getch();
}
}

  return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/902230</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902230</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Thu, 27 Oct 2005 19:04:24 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Fri, 28 Oct 2005 07:50:25 GMT]]></title><description><![CDATA[<p>Stimmt der Dateipfad (bei relativen Angaben könnte es Probleme mit dem Ausgangspunkt geben)?</p>
<p>Ansonsten: Je länger ich den Quelltext ansehe, desto stärker fällt auf, daß eine der Schleifen (while oder for) wohl überflüssig ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/902468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902468</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 28 Oct 2005 07:50:25 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Fri, 28 Oct 2005 08:54:41 GMT]]></title><description><![CDATA[<p>Ja, der Pfad stimmte, aber das das jetzt nicht bei mir zu Hause geklappt hat ist nich so schlimm. Muss ich später mal gucken. Aber mit welchen Befehl mach ich das jetzt, das der die umgewandelte nicht mal auf dem Bildschirm anzeigt, sondern direkt in eine neue Datei speichert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/902520</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902520</guid><dc:creator><![CDATA[SolidSnake]]></dc:creator><pubDate>Fri, 28 Oct 2005 08:54:41 GMT</pubDate></item><item><title><![CDATA[Reply to Umlaute-Programm on Fri, 28 Oct 2005 09:02:18 GMT]]></title><description><![CDATA[<p>am einfachsten, indem du cout durch einen fstream ersetzt:</p>
<pre><code class="language-cpp">//in dem Gebiet, wo du auch deine Eingabedatei festlegst - wenn du willst, kannst du den Dateinamen auch vorher abfragen:
ofstream ofile(&quot;outfile.txt&quot;);

//Zum Schreiben wert: (anstelle der &quot;cout&lt;&lt;wert;&quot; Aufrufe)
ofile&lt;&lt;wert;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/902534</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902534</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 28 Oct 2005 09:02:18 GMT</pubDate></item></channel></rss>