<?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[[GELÖST]Mit C++ ein HTML Protokoll &amp;quot;führen&amp;quot;?[GELÖST]]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich will mir eine kleine Klasse schreiben die mir von mir gegebene Strings(bspw. &quot;Datei konnte nicht geöffnet werden!&quot;) in eine html File(in html) schreibt. Nun die erste Frage:</p>
<p>1.) Kann ich einfach html Code in einen String schreiben und den dann in die .html File? Oder muss ich da was beachten?</p>
<p>Nun will ich aber auch Zeilennummer und Dateinamen hinzufügen(bspw. &quot;Datei kontte nicht geöffnet werden, Zeile 43, main.cpp&quot;) weitere Frage:</p>
<p>2.) Gibts irgendwelche C++ Funktionen dafür(darf nicht Plattformabhängig sein)</p>
<p>Danke schonmal im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/188555/gelöst-mit-c-ein-html-protokoll-quot-führen-quot-gelöst</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 03:59:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/188555.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Aug 2007 17:21:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [GELÖST]Mit C++ ein HTML Protokoll &amp;quot;führen&amp;quot;?[GELÖST] on Wed, 01 Aug 2007 17:36:46 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich will mir eine kleine Klasse schreiben die mir von mir gegebene Strings(bspw. &quot;Datei konnte nicht geöffnet werden!&quot;) in eine html File(in html) schreibt. Nun die erste Frage:</p>
<p>1.) Kann ich einfach html Code in einen String schreiben und den dann in die .html File? Oder muss ich da was beachten?</p>
<p>Nun will ich aber auch Zeilennummer und Dateinamen hinzufügen(bspw. &quot;Datei kontte nicht geöffnet werden, Zeile 43, main.cpp&quot;) weitere Frage:</p>
<p>2.) Gibts irgendwelche C++ Funktionen dafür(darf nicht Plattformabhängig sein)</p>
<p>Danke schonmal im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1336733</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1336733</guid><dc:creator><![CDATA[Raxtor]]></dc:creator><pubDate>Wed, 01 Aug 2007 17:36:46 GMT</pubDate></item><item><title><![CDATA[Reply to [GELÖST]Mit C++ ein HTML Protokoll &amp;quot;führen&amp;quot;?[GELÖST] on Wed, 01 Aug 2007 17:29:19 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>HTML ist ein textbasierendes Format, also kannst du sehr einfach mit std::fstream darauf lesend und schreibend zugreifen.<br />
Allerdings bietet C++ keine speziellen Funktion für HTML-Syntax. Entweder suchst du dir dafür eine externe Lib oder schreibst dir selber das was du benötigst.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1336739</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1336739</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 01 Aug 2007 17:29:19 GMT</pubDate></item><item><title><![CDATA[Reply to [GELÖST]Mit C++ ein HTML Protokoll &amp;quot;führen&amp;quot;?[GELÖST] on Wed, 01 Aug 2007 17:29:32 GMT]]></title><description><![CDATA[<p>1. Mir würde da nichts einfallen.</p>
<p>Musst höchtens auf Anführungszeichen achten: \&quot;!</p>
<p>2. __FILE__, __LINE__, wobei __FILE__ den GESAMTEN Dateinamen (+ Pfad) angibt.</p>
<p>Ist ANSI-C, sollte also jeder Compiler unterstützen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1336741</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1336741</guid><dc:creator><![CDATA[keineahnung_mehr]]></dc:creator><pubDate>Wed, 01 Aug 2007 17:29:32 GMT</pubDate></item><item><title><![CDATA[Reply to [GELÖST]Mit C++ ein HTML Protokoll &amp;quot;führen&amp;quot;?[GELÖST] on Wed, 01 Aug 2007 17:30:32 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#define LOG(msg) Log::GetInstance().Log(msg, __FILE__, __LINE__)

...

class Log
{
    // Singleton, mach ich halt so, kannst auch anders machen
    Log ();
public:
    ~Log (); // nicht aufs datei schließen vergessen hier drin!
    static Log&amp; GetInstance ();

    // Schreibt halt irgendwie im HTML-Format in eine .html-Datei (nein nix zu beachten)
    void Log (const char* msg, const char* file, int line);

private:
    Log (const Log&amp;);
    Log&amp; operator= (const Log&amp;);
};

...

int main ()
{
    LOG(&quot;Application started&quot;);
    return 0;
}
</code></pre>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1336742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1336742</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Wed, 01 Aug 2007 17:30:32 GMT</pubDate></item><item><title><![CDATA[Reply to [GELÖST]Mit C++ ein HTML Protokoll &amp;quot;führen&amp;quot;?[GELÖST] on Wed, 01 Aug 2007 17:35:29 GMT]]></title><description><![CDATA[<p>Also danke für eure Antworten werde mir mal was basteln <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="😉"
    /> thx @ all hat sich erledigt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1336749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1336749</guid><dc:creator><![CDATA[Raxtor]]></dc:creator><pubDate>Wed, 01 Aug 2007 17:35:29 GMT</pubDate></item></channel></rss>