<?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[Fehler ???]]></title><description><![CDATA[<p>Ich habe erst vor wenigen Tagen mit C++ angefangen und bekomme hier ständig ne Fehlermeldung. Was ist daran falsch?</p>
<pre><code class="language-cpp">#include &quot;PDF.h&quot;
#include &lt;string&gt;
using namespace std;

void main()
{
	string Name=&quot;Test.txt&quot;;
	PDF_Libery pdf;
	pdf.size(2); // Seitenformat (1 = A4, 2 = A3, 3  = A5)
	pdf.save(Name); // speichert die PDF
};
</code></pre>
<p>Und hier die PDF.h:</p>
<pre><code class="language-cpp">#include &lt;fstream&gt;
using namespace std;
#include &lt;string&gt;
using namespace std;

class PDF_Libery
{
private:

	double Seitenbreite;
	double Seitenhoehe;

public:

	PDF_Libery() // Konstruktor
	{
			Seitenbreite = 595.2; // Standard: A4
			Seitenhoehe	 = 841.9;
	};

	void size(float Format) // Seitenformat
	{
		if(Format == 1) // A4
		{
			Seitenbreite = 595.2;
			Seitenhoehe	 = 841.9;
		};
		if(Format == 2) // A3
		{
			Seitenbreite =  841.9;
			Seitenhoehe	 = 1190.5;
		};
		if(Format == 3) // A5
		{
			Seitenbreite = 420.9;
			Seitenhoehe	 = 595.2;
		};
	};

	void save(string Dateiname) // speichert die Datei
		ofstream out(Dateiname);

		out &lt;&lt; &quot;Test &quot; &lt;&lt; endl;
		out &lt;&lt; &quot;Breite=&quot; &lt;&lt; Seitenbreite &lt;&lt; endl;
		out &lt;&lt; &quot; Hoehe=&quot; &lt;&lt; Seitenhoehe &lt;&lt; endl;
	};
};
</code></pre>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160526/fehler</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 07:27:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160526.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Sep 2006 16:35:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler ??? on Tue, 26 Sep 2006 16:35:43 GMT]]></title><description><![CDATA[<p>Ich habe erst vor wenigen Tagen mit C++ angefangen und bekomme hier ständig ne Fehlermeldung. Was ist daran falsch?</p>
<pre><code class="language-cpp">#include &quot;PDF.h&quot;
#include &lt;string&gt;
using namespace std;

void main()
{
	string Name=&quot;Test.txt&quot;;
	PDF_Libery pdf;
	pdf.size(2); // Seitenformat (1 = A4, 2 = A3, 3  = A5)
	pdf.save(Name); // speichert die PDF
};
</code></pre>
<p>Und hier die PDF.h:</p>
<pre><code class="language-cpp">#include &lt;fstream&gt;
using namespace std;
#include &lt;string&gt;
using namespace std;

class PDF_Libery
{
private:

	double Seitenbreite;
	double Seitenhoehe;

public:

	PDF_Libery() // Konstruktor
	{
			Seitenbreite = 595.2; // Standard: A4
			Seitenhoehe	 = 841.9;
	};

	void size(float Format) // Seitenformat
	{
		if(Format == 1) // A4
		{
			Seitenbreite = 595.2;
			Seitenhoehe	 = 841.9;
		};
		if(Format == 2) // A3
		{
			Seitenbreite =  841.9;
			Seitenhoehe	 = 1190.5;
		};
		if(Format == 3) // A5
		{
			Seitenbreite = 420.9;
			Seitenhoehe	 = 595.2;
		};
	};

	void save(string Dateiname) // speichert die Datei
		ofstream out(Dateiname);

		out &lt;&lt; &quot;Test &quot; &lt;&lt; endl;
		out &lt;&lt; &quot;Breite=&quot; &lt;&lt; Seitenbreite &lt;&lt; endl;
		out &lt;&lt; &quot; Hoehe=&quot; &lt;&lt; Seitenhoehe &lt;&lt; endl;
	};
};
</code></pre>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1144921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1144921</guid><dc:creator><![CDATA[-Curry- 0]]></dc:creator><pubDate>Tue, 26 Sep 2006 16:35:43 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler ??? on Tue, 26 Sep 2006 16:40:16 GMT]]></title><description><![CDATA[<p>WAS für eine Fehlermeldung?<br />
Was hat das mit MFC zu tun?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1144926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1144926</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 26 Sep 2006 16:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler ??? on Tue, 26 Sep 2006 17:27:13 GMT]]></title><description><![CDATA[<p>Es gehört immerhin zu visual c++.<br />
Sorry wenn's hier falsch ist, C++ wäre wohl passender.</p>
<p>Hier die Fehlermeldung:</p>
<p>error C2664: '__thiscall std::basic_ofstream&lt;char,struct std::char_traits&lt;char&gt; &gt;::std::basic_ofstream&lt;char,struct std::char_traits&lt;char&gt; &gt;(const char *,int)' : Konvertierung des Parameters 1 von 'class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;' in 'const char *' nicht moeglich<br />
Kein benutzerdefinierter Konvertierungsoperator verfuegbar, der diese Konvertierung durchfuehren kann, oder der Operator kann nicht aufgerufen werden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1144964</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1144964</guid><dc:creator><![CDATA[-Curry- 0]]></dc:creator><pubDate>Tue, 26 Sep 2006 17:27:13 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler ??? on Tue, 26 Sep 2006 18:16:30 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=9713" rel="nofollow">estartu</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=1" rel="nofollow">MFC (Visual C++)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145010</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 26 Sep 2006 18:16:30 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler ??? on Tue, 26 Sep 2006 18:35:07 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Schreib mal:</p>
<pre><code>ofstream out(Dateiname.c_str());
</code></pre>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145026</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 26 Sep 2006 18:35:07 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler ??? on Wed, 27 Sep 2006 07:12:08 GMT]]></title><description><![CDATA[<p>-Curry- schrieb:</p>
<blockquote>
<p>...Libery...</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> *augenkrebs*</p>
<p>Sorry, aber wenn Bezeichner helfen sollen, das Verständnis des Codes zu vereinfachen, sorgt sowas für eine mentale Vollbremsung (auch, wenn man es an 100 Stellen verwendet).</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145234</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Wed, 27 Sep 2006 07:12:08 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler ??? on Wed, 27 Sep 2006 16:41:40 GMT]]></title><description><![CDATA[<p>Ja danke funtzt: <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1145567</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1145567</guid><dc:creator><![CDATA[-Curry- 0]]></dc:creator><pubDate>Wed, 27 Sep 2006 16:41:40 GMT</pubDate></item></channel></rss>