<?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[Problem bei nichtdeklarierter Bezeichner]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe zwei Klassen geschreiben:</p>
<pre><code class="language-cpp">class Klasse1
{
private:
  // alle Variablen...
public:
  // Konstrukter, Destrukter, Methoden...
};

class Klasse2
{
private:
  //...
public:
  //...
  void specialStyles()
  {
    Klasse1 obj(10, 11);
    // ...
  }
};
</code></pre>
<p>Ich erhalte daraufhin folgende Fehlermeldungen:</p>
<pre><code>error C2065: 'Klasse1': nichtdeklarierter Bezeichner
error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'obj'
error C2065: 'obj': nichtdeklarierter Bezeichner
</code></pre>
<p>Ich habe warscheinlich (schon wieder) einen dummen Fehler gemacht. Warscheinlich habe ich etwas vergessen, das mir jetzt nicht einfällt.<br />
Weiß einer was ich falsch gemacht habe?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/265912/problem-bei-nichtdeklarierter-bezeichner</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Sep 2026 16:41:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/265912.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Apr 2010 19:37:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem bei nichtdeklarierter Bezeichner on Fri, 30 Apr 2010 19:37:39 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe zwei Klassen geschreiben:</p>
<pre><code class="language-cpp">class Klasse1
{
private:
  // alle Variablen...
public:
  // Konstrukter, Destrukter, Methoden...
};

class Klasse2
{
private:
  //...
public:
  //...
  void specialStyles()
  {
    Klasse1 obj(10, 11);
    // ...
  }
};
</code></pre>
<p>Ich erhalte daraufhin folgende Fehlermeldungen:</p>
<pre><code>error C2065: 'Klasse1': nichtdeklarierter Bezeichner
error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner 'obj'
error C2065: 'obj': nichtdeklarierter Bezeichner
</code></pre>
<p>Ich habe warscheinlich (schon wieder) einen dummen Fehler gemacht. Warscheinlich habe ich etwas vergessen, das mir jetzt nicht einfällt.<br />
Weiß einer was ich falsch gemacht habe?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1890631</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1890631</guid><dc:creator><![CDATA[C++H]]></dc:creator><pubDate>Fri, 30 Apr 2010 19:37:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei nichtdeklarierter Bezeichner on Fri, 30 Apr 2010 19:40:52 GMT]]></title><description><![CDATA[<p>Leben die beiden Klassen in zwei *.h-Dateien und haben sich gegenseitig inkludiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1890634</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1890634</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Fri, 30 Apr 2010 19:40:52 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei nichtdeklarierter Bezeichner on Fri, 30 Apr 2010 20:00:24 GMT]]></title><description><![CDATA[<p>Nein, die beiden Klassen befinden sich in ein und der selben *.cpp-Datei.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1890646</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1890646</guid><dc:creator><![CDATA[C++H]]></dc:creator><pubDate>Fri, 30 Apr 2010 20:00:24 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei nichtdeklarierter Bezeichner on Fri, 30 Apr 2010 20:04:54 GMT]]></title><description><![CDATA[<p>Bitte Originalinhalt der Datei posten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1890648</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1890648</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Fri, 30 Apr 2010 20:04:54 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei nichtdeklarierter Bezeichner on Fri, 30 Apr 2010 20:12:18 GMT]]></title><description><![CDATA[<p>Puh. Der ist ziemlich lang, aber okay. Eigentlich ist das der Orginal-Code:</p>
<pre><code>class html
{
private:
	string titel;
	string beschreibung;
	string schluesselwoerter;
	int borderStyle;					// Rahmen-Style
	string bgColor;						// Hintergrundfarbe
	string bgPath;						// Pfad zum Background-Bild
	string fontColor;					// Schriftfarbe
	string fontFamily;					// Schriftart
	int fontSize;						// Schriftgröße
public:
	html(string ttl, string besch, string schlw)
		: titel(ttl), beschreibung(besch), schluesselwoerter(schlw)
	{}

	void stdOptions()						// Standart-Werte wie Titel, Beschreibung ect. setzten
	{
		cout &lt;&lt;&quot;W&quot; &lt;&lt;ae &lt;&lt;&quot;hlen Sie den Titel f&quot; &lt;&lt;ue &lt;&lt;&quot;r Ihre Seite, dieser wird oben im Tab des Browserfenstersangezeigt.\n&quot;;
		cin &gt;&gt;titel;
		cout &lt;&lt;&quot;Schreiben Sie eine kleine Beschreibung Ihrer Seite.\n&quot;;
		cin &gt;&gt;beschreibung;
		cout &lt;&lt;&quot;Geben Sie ein paar Schl&quot; &lt;&lt;ue &lt;&lt;&quot;sselw&quot; &lt;&lt;oe &lt;&lt;&quot;rter f&quot; &lt;&lt;ue &lt;&lt;&quot;r Ihre Seite ein, damit kann man Ihre Seiteper Suchmaschine finden.\n&quot;;
		cin &gt;&gt;schluesselwoerter;
		system(&quot;pause&quot;);					// Nach Tastaturklick -&gt; weiter
		system(&quot;cls&quot;);						// Clear Screen
	}

	void backgroundStyle()
	{
		int eingabe;

		cout &lt;&lt;&quot;Wollen Sie ein Bild oder eine Farbe als Hintergrund haben?\n&quot;;
		cout &lt;&lt;&quot;1 = Bild\n2 = Farbe\n&quot;;
		cin &gt;&gt;eingabe;

		switch (eingabe)
		{
		case 1:
			bgPath = this-&gt;setPicPath();								// Pfad zum Background-Pic setzen
			break;
		case 2:
			bgColor = this-&gt;colorConvert();								// Hintergrundfarbe setzen
			break;
		}
	}

	string setPicPath()
	{
		string picPath;

		cout &lt;&lt;&quot;Geben Sie den Pfad zum Bild ein.\n&quot;;
		cin &gt;&gt;picPath;
		return picPath;
	}

	void specialStyles()
	{
		 :arrow_right:  definedStyle curr;

	}

	void styleOptions()
	{
		int eingabe;

		cout &lt;&lt;&quot;Welchen Style wollen Sie einstellen?\n&quot;;
		cout &lt;&lt;&quot;1 = Textstyle.\n&quot;;
		cout &lt;&lt;&quot;2 = Hintergrund.\n&quot;;
		cout &lt;&lt;&quot;3 = Besondere Styles.\n&quot;;
		cin &gt;&gt;eingabe;
		system(&quot;cls&quot;);

		switch (eingabe)
		{
		case 1:
			this-&gt;chooseTxtStyle();
			system(&quot;cls&quot;);
			this-&gt;giveOptions();
			break;
		case 2:
			this-&gt;backgroundStyle();
			system(&quot;cls&quot;);
			this-&gt;giveOptions();
			break;
		case 3:
			system(&quot;cls&quot;);
			this-&gt;specialStyles();
			this-&gt;giveOptions();
		default:
			cout &lt;&lt;&quot;Falsche Eingabe!\n&quot;;
			system(&quot;cls&quot;);
			this-&gt;styleOptions();
		}
	}

	void chooseTxtStyle()
	{

		cout &lt;&lt;&quot;Welchen Rahmensyle m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie f&quot; &lt;&lt;ue &lt;&lt;&quot;r Ihre Homepage nehmen?\n&quot;;
		cout &lt;&lt;&quot;Eine kleine Vorschau...\n&quot;;
		system(&quot;pause&quot;);

		system(&quot;start C:/HtmlManager/styles/preview.html&quot;);		// starten der Html-Styles Vorschau

		cout &lt;&lt;&quot;\nStyle 1\nStyle 2\nStyle 3\nStyle 4\nStyle 5\n&quot;;
		cin &gt;&gt;borderStyle;
		system(&quot;cls&quot;);

		int eingabe;

		cout &lt;&lt;&quot;Welche Schriftart m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie haben\n&quot;;
		cout &lt;&lt;&quot;1 = Arial\n&quot;;
		cout &lt;&lt;&quot;2 = Verdana\n&quot;;
		cout &lt;&lt;&quot;3 = Helvectia\n&quot;;
		cout &lt;&lt;&quot;4 = Comic Sans MS\n&quot;;
		cout &lt;&lt;&quot;5 = New Times Roman\n&quot;;
		cout &lt;&lt;&quot;6 = Courier\n&quot;;
		cout &lt;&lt;&quot;7 = Courier New\n&quot;;
		cout &lt;&lt;&quot;8 = Wide Latin\n&quot;;
		cin &gt;&gt;eingabe;
		system (&quot;cls&quot;);

		switch (eingabe)
		{
		case 1: fontFamily = &quot;Arial&quot;; break;
		case 2: fontFamily = &quot;Verdana&quot;; break;
		case 3: fontFamily = &quot;Helvectia&quot;; break;
		case 4: fontFamily = &quot;Comic Sans MS&quot;; break;
		case 5: fontFamily = &quot;New Times Roman&quot;; break;
		case 6: fontFamily = &quot;Courier&quot;; break;
		case 7: fontFamily = &quot;Courier New&quot;; break;
		case 8: fontFamily = &quot;Wide Latin&quot;; break;
		}

		cout &lt;&lt;&quot;Welche Schriftfarbe m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie haben?\n&quot;;

		fontColor = colorConvert();
		system(&quot;cls&quot;);

		cout &lt;&lt;&quot;Welche Schriftgr&quot; &lt;&lt;oe &lt;&lt;sz &lt;&lt;&quot;e m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie haben?(in Pixel)\n&quot;;
		cin &gt;&gt;fontSize;
	}

	string colorConvert()
	{
		int red, green, blue;
		stringstream color;
		system(&quot;cls&quot;);

		cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Rot?\n&quot;;
		cin &gt;&gt;red;
		cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Gr&quot;&lt;&lt;ue &lt;&lt;&quot;n?\n&quot;;
		cin &gt;&gt;green;
		cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Blau?\n&quot;;
		cin &gt;&gt;blue;

		color &lt;&lt;hex &lt;&lt;&quot;#&quot; &lt;&lt;red &lt;&lt;green &lt;&lt;blue;				// ins Hex-Format
		system(&quot;cls&quot;);

		return color.str();
	}
	void giveOptions()							// zeigt Optionen an, die man machen kann und 
	{											// führt die entsprechende Funktion aus
		int eingabe;

		cout &lt;&lt;&quot;Was wollen Sie als n&quot; &lt;&lt;ae &lt;&lt;&quot;chstes machen?\n\n&quot;;
		cout &lt;&lt;&quot;1 = Titel, Beschreibung, Schl&quot; &lt;&lt;ue &lt;&lt;&quot;sselw&quot; &lt;&lt;oe &lt;&lt;&quot;rter &quot; &lt;&lt;ae &lt;&lt;&quot;ndern.\n&quot;;
		cout &lt;&lt;&quot;2 = Stil der Seite &quot; &lt;&lt;ae &lt;&lt;&quot;nderen.\n&quot;;
		cout &lt;&lt;&quot;3 = Objekt hinzuf&quot; &lt;&lt;ue &lt;&lt;&quot;gen.\n&quot;;
		cout &lt;&lt;&quot;4 = Credits sehen.\n&quot;;
		cout &lt;&lt;&quot;5 = Speichern.\n&quot;;
		cin &gt;&gt;eingabe;

		switch(eingabe)
		{
		case 1:
			system(&quot;cls&quot;);			// WICHTIG: Hier system(&quot;cls&quot;); immer als erstes
			stdOptions();
			giveOptions();			// Zurück zu den Optionen
			break;
		case 2:
			system(&quot;cls&quot;);			// hier kein giveOptions(f), sonst rekursiever Überlauf WICHTIG: Muss in die
			styleOptions();			// saveFile()!
			break;
		case 3:
			system(&quot;cls&quot;);
			giveOptions();
			break;
		case 4:
			system(&quot;cls&quot;);
			giveOptions();
			break;
		case 5:
			system(&quot;cls&quot;);
			giveOptions();
			break;
		default:
			system(&quot;cls&quot;);
			cout &lt;&lt;&quot;Falsche Eingabe!\n&quot;;
			giveOptions();
			break;
		}
	}
};

class definedStyle
{
private:
	bool isSelected[20];				// prüft ob der Code selektiert ist
	string nameCurrentStyle;			// Name des aktuellen Styls (Style werden sofort gespeichert!)
	string currentStyleCode;			// Zusammengefügter Code aus dem aktuellen Style (wird großer Code!)
	string styleCodes[20];				// Style Codes als Array und dynamischer Speicher (viele Codes!)
	string rollOverCode;
public:
	definedStyle()
		: nameCurrentStyle(&quot;&quot;)
	{
		for (int i; i &lt; 21; ++i)
		{
			isSelected[i] = false;									// alle isSelected auf false setzen (zur Sicherheit!)
		}

		// Codes für die Styles definieren
		styleCodes[0] = &quot;font-style:italic;\n&quot;;						// Kursiv
		styleCodes[1] = &quot;font-weight: bold;\n&quot;;						// Fett
		styleCodes[2] = &quot;border-bottom:&quot;;							// + colorConvert + Rahmen Style + Dicke des Rahmens in px
		styleCodes[3] = &quot;background-color:#&quot;;						// Hintergrund-Farbe WICHTIG: Muss noch colorConvert gemacht werden!
		styleCodes[4] = &quot;color:#&quot;;									// WICHTIG: Muss noch colorConvert gemacht werden!
		styleCodes[5] = &quot;font-size:&quot;;								// Größe in px muss noch erfragt werden!
		styleCodes[6] = &quot;text-decoration:blink;\n&quot;;
		styleCodes[7] = &quot;text-decoration:line-through;\n&quot;;			// Kann nicht mit anderer Text-Decoration kooperieren!
		styleCodes[8] = &quot;word-spacind:&quot;;							// Noch Abstand in px
		styleCodes[9] = &quot;letter-spacing:&quot;;							// Noch Abstand in px
		styleCodes[10] = &quot;text-shadow: 3px 2px #&quot;;					// Schatten 1 + colorConvert
		styleCodes[11] = &quot;text-shadow: 3px 2px 4 px #&quot;;				// Schatten 2 + colorConvert
		styleCodes[12] = &quot;border-top: &quot;;							// + colorConvert + Rahmen Style + Dicke des Rahmens in px
		styleCodes[13] = &quot;font-family:'Courier New';\n&quot;;			// Andere Font
		styleCodes[14] = &quot;direction:rtl;\nunicode-bidi:bidi-override;\ntext-align:left;\n&quot;;		// Umgekehrt
		styleCodes[15] = &quot;border:&quot;;									// + colorConvert + Rahmen Style + Dicke des Rahmens in px
		// hier kommen alle Rollover, diese kommen in den :hover, alle davor in den normalen!!!
		styleCodes[16] = &quot;color:#&quot;;									// colorConvert bitte!
		styleCodes[17] = &quot;border-bottom:&quot;;							// + colorConvert + Rahmen Style + Dicke des Rahmens in px
		styleCodes[18] = &quot;background-color:#&quot;;						// colorConvert bitte!
		styleCodes[19] = &quot;border:&quot;;									// + colorConvert + Rahmen Style + Dicke des Rahmens in px
	}

	~definedStyle()
	{
		// delete currentStyleCode;			// da dynamischer Speicher
	}

	void defineStyle(html f)
	{
		cout &lt;&lt;&quot;Wie soll der neu Style hei&quot; &lt;&lt;sz &lt;&lt;&quot;en?\n&quot;;
		cin &gt;&gt;nameCurrentStyle;
		cout &lt;&lt;&quot;Hier eine kleine Vorschau m&quot; &lt;&lt;oe &lt;&lt;&quot;glicher Styles...\n&quot;;
		system(&quot;pause&quot;);
		system(&quot;start C:/HtmlManager/styles/preview.html&quot;);						// starten der Html-Styles Vorschau
		system(&quot;cls&quot;);															// nochmal clrscr

		int eingabe;															// die Eingabe des Users
		cout &lt;&lt;&quot;Welche Stile sollen in Ihren Style eingebunden werden?\n&quot;;
		cout &lt;&lt;&quot;1 = Kursiver Stil\n&quot;;
		cout &lt;&lt;&quot;2 = Fetter Stil\n&quot;;
		cout &lt;&lt;&quot;3 = Unterstrichener Stil\n&quot;;
		cout &lt;&lt;&quot;4 = Hintergrundfarbener Stil\n&quot;;
		cout &lt;&lt;&quot;5 = Schriftfarbener Stil\n&quot;;
		cout &lt;&lt;&quot;6 = Kleine Schrift Stil\n&quot;;
		cout &lt;&lt;&quot;7 = Blinkender Stil\n&quot;;
		cout &lt;&lt;&quot;8 = Durchgestrichener Stil\n&quot;;
		cout &lt;&lt;&quot;9 = Wort Abstand Stil\n&quot;;
		cout &lt;&lt;&quot;10 = Buchstaben Abstand Stil\n&quot;;
		cout &lt;&lt;&quot;11 = Schatten Abstand Stil 1\n&quot;;
		cout &lt;&lt;&quot;12 = Schatten Abstand Stil 2\n&quot;;
		cout &lt;&lt;&quot;13 = &quot; &lt;&lt;UE &lt;&lt;&quot;berstrichener Stil\n&quot;;
		cout &lt;&lt;&quot;14 = Codierter Stil&quot;;
		cout &lt;&lt;&quot;15 = Umgekehrter Stil\n&quot;;
		cout &lt;&lt;&quot;16 = Rahmen Stil\n&quot;;
		cout &lt;&lt;&quot;17 = Rollover Stil 1\n&quot;;
		cout &lt;&lt;&quot;18 = Rollover Stil 2\n&quot;;
		cout &lt;&lt;&quot;19 = Rollover Stil 3\n&quot;;
		cout &lt;&lt;&quot;20 = Rollover Stil 4\n&quot;;
		cout &lt;&lt;&quot;21 = Style speichern\n&quot;;
		cin &gt;&gt;eingabe;

		switch (eingabe)
		{
		case 1:
			if (isSelected[0])
				break;
			isSelected[0] = true;				// Style 1 ist hinzugefügt
			if (isSelected[0])
				currentStyleCode += styleCodes[0];
			break;
		case 2:
			isSelected[1] = true;				// Style 2 ist hinzugefügt
			break;
		case 3:
			isSelected[2] = true;				//...
			break;
		case 4:
			isSelected[3] = true;
			break;
		case 5:
			isSelected[4] = true;
			break;
		case 6:
			isSelected[5] = true;
			break;
		case 7:
			isSelected[6] = true;
			break;
		case 8:
			isSelected[7] = true;
			break;
		case 9:
			isSelected[8] = true;
			break;
		case 10:
			isSelected[9] = true;
			break;
		case 11:
			isSelected[10] = true;
			break;
		case 12:
			isSelected[12] = true;
			break;
		case 13:
			isSelected[13] = true;
			break;
		case 14:
			isSelected[14] = true;
			break;
		case 15:
			isSelected[15] = true;
			break;
		case 17:
			isSelected[16] = true;
			break;
		case 18:
			isSelected[17] = true;
			break;
		case 19:
			isSelected[18] = true;
			break;
		case 20:
			isSelected[19] = true;
			break;
		case 21:							// speichern
			break;
		default:
			system(&quot;cls&quot;);
			f.giveOptions();
			break;
		}
	}

	string colorConvert()
	{
		int red, green, blue;
		stringstream color;

		cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Rot?\n&quot;;
		cin &gt;&gt;red;
		cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Gr&quot;&lt;&lt;ue &lt;&lt;&quot;n?\n&quot;;
		cin &gt;&gt;green;
		cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Blau?\n&quot;;
		cin &gt;&gt;blue;

		color &lt;&lt;hex &lt;&lt;&quot;#&quot; &lt;&lt;red &lt;&lt;green &lt;&lt;blue;				// ins Hex-Format
		system(&quot;cls&quot;);

		return color.str();
	}

};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1890649</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1890649</guid><dc:creator><![CDATA[C++H]]></dc:creator><pubDate>Fri, 30 Apr 2010 20:12:18 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei nichtdeklarierter Bezeichner on Fri, 30 Apr 2010 20:40:11 GMT]]></title><description><![CDATA[<p>Verzeih, Janjan ist noch neu dabei. Er brauchte ein möglichst klein zusammengeschrumpftes Beispiuel, wo der Fehler auch noch vorkommt.<br />
Dein Problem ist, daß definedStyle html benutzen möchte und auch html definedStyle benutzen möchte.<br />
Das geht nicht zugleich.<br />
Aber was supi geht, ist, wenn die eine Klasse da ist und die andere nur als Referenz oder Zeiger.<br />
Oft geht es auch, nur die Implementierung nach *.cpp-Dateien auszulagern, aber uih, obacht passen, bei der inen Datei unter und beider anderen über der Klassendefinition den Partner inkludieren. Hab ich hier mit html::specialStyles() gemacht. Oh, das ist aber böse. Versuch mal, zu schauen, ob Du, wenn Du nochmal schaust, wie #include geht, sehen kannst, wie der trick geht. Wenns nicht klappt, ist es auch keine Schande, dann machen wir es irgendwie einfacher; mein Vorschlag war davon inspiriert, möglischt wenig zu ändern.</p>
<pre><code>#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;process.h&gt;
#include &lt;windows.h&gt;
#include &lt;string&gt;
#include &lt;sstream&gt;
using namespace std;
#define ae &quot;ae&quot;
#define ue &quot;ue&quot;
#define Ue &quot;Ue&quot;
#define oe &quot;oe&quot;
#define sz &quot;sz&quot;
#define UE &quot;UE&quot;

class definedStyle;

class html
{
private:
    string titel;
    string beschreibung;
    string schluesselwoerter;
    int borderStyle;                    // Rahmen-Style
    string bgColor;                        // Hintergrundfarbe
    string bgPath;                        // Pfad zum Background-Bild
    string fontColor;                    // Schriftfarbe
    string fontFamily;                    // Schriftart
    int fontSize;                        // Schriftgröße
public:
    html(string ttl, string besch, string schlw)
        : titel(ttl), beschreibung(besch), schluesselwoerter(schlw)
    {}

    void stdOptions()                        // stan****-Werte wie Titel, Beschreibung ect. setzten
    {
        cout &lt;&lt;&quot;W&quot; &lt;&lt;ae &lt;&lt;&quot;hlen Sie den Titel f&quot; &lt;&lt;ue &lt;&lt;&quot;r Ihre Seite, dieser wird oben im Tab des Browserfenstersangezeigt.\n&quot;;
        cin &gt;&gt;titel;
        cout &lt;&lt;&quot;Schreiben Sie eine kleine Beschreibung Ihrer Seite.\n&quot;;
        cin &gt;&gt;beschreibung;
        cout &lt;&lt;&quot;Geben Sie ein paar Schl&quot; &lt;&lt;ue &lt;&lt;&quot;sselw&quot; &lt;&lt;oe &lt;&lt;&quot;rter f&quot; &lt;&lt;ue &lt;&lt;&quot;r Ihre Seite ein, damit kann man Ihre Seiteper Suchmaschine finden.\n&quot;;
        cin &gt;&gt;schluesselwoerter;
        system(&quot;pause&quot;);                    // Nach Tastaturklick -&gt; weiter
        system(&quot;cls&quot;);                        // Clear Screen
    }

    void backgroundStyle()
    {
        int eingabe;

        cout &lt;&lt;&quot;Wollen Sie ein Bild oder eine Farbe als Hintergrund haben?\n&quot;;
        cout &lt;&lt;&quot;1 = Bild\n2 = Farbe\n&quot;;
        cin &gt;&gt;eingabe;

        switch (eingabe)
        {
        case 1:
            bgPath = this-&gt;setPicPath();                                // Pfad zum Background-Pic setzen
            break;
        case 2:
            bgColor = this-&gt;colorConvert();                                // Hintergrundfarbe setzen
            break;
        }
    }

    string setPicPath()
    {
        string picPath;

        cout &lt;&lt;&quot;Geben Sie den Pfad zum Bild ein.\n&quot;;
        cin &gt;&gt;picPath;
        return picPath;
    }

    void specialStyles();

    void styleOptions()
    {
        int eingabe;

        cout &lt;&lt;&quot;Welchen Style wollen Sie einstellen?\n&quot;;
        cout &lt;&lt;&quot;1 = Textstyle.\n&quot;;
        cout &lt;&lt;&quot;2 = Hintergrund.\n&quot;;
        cout &lt;&lt;&quot;3 = Besondere Styles.\n&quot;;
        cin &gt;&gt;eingabe;
        system(&quot;cls&quot;);

        switch (eingabe)
        {
        case 1:
            this-&gt;chooseTxtStyle();
            system(&quot;cls&quot;);
            this-&gt;giveOptions();
            break;
        case 2:
            this-&gt;backgroundStyle();
            system(&quot;cls&quot;);
            this-&gt;giveOptions();
            break;
        case 3:
            system(&quot;cls&quot;);
            this-&gt;specialStyles();
            this-&gt;giveOptions();
        default:
            cout &lt;&lt;&quot;Falsche Eingabe!\n&quot;;
            system(&quot;cls&quot;);
            this-&gt;styleOptions();
        }
    }

    void chooseTxtStyle()
    {

        cout &lt;&lt;&quot;Welchen Rahmensyle m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie f&quot; &lt;&lt;ue &lt;&lt;&quot;r Ihre Homepage nehmen?\n&quot;;
        cout &lt;&lt;&quot;Eine kleine Vorschau...\n&quot;;
        system(&quot;pause&quot;);

        system(&quot;start C:/HtmlManager/styles/preview.html&quot;);        // starten der Html-Styles Vorschau

        cout &lt;&lt;&quot;\nStyle 1\nStyle 2\nStyle 3\nStyle 4\nStyle 5\n&quot;;
        cin &gt;&gt;borderStyle;
        system(&quot;cls&quot;);

        int eingabe;

        cout &lt;&lt;&quot;Welche Schriftart m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie haben\n&quot;;
        cout &lt;&lt;&quot;1 = Arial\n&quot;;
        cout &lt;&lt;&quot;2 = Verdana\n&quot;;
        cout &lt;&lt;&quot;3 = Helvectia\n&quot;;
        cout &lt;&lt;&quot;4 = Comic Sans MS\n&quot;;
        cout &lt;&lt;&quot;5 = New Times Roman\n&quot;;
        cout &lt;&lt;&quot;6 = Courier\n&quot;;
        cout &lt;&lt;&quot;7 = Courier New\n&quot;;
        cout &lt;&lt;&quot;8 = Wide Latin\n&quot;;
        cin &gt;&gt;eingabe;
        system (&quot;cls&quot;);

        switch (eingabe)
        {
        case 1: fontFamily = &quot;Arial&quot;; break;
        case 2: fontFamily = &quot;Verdana&quot;; break;
        case 3: fontFamily = &quot;Helvectia&quot;; break;
        case 4: fontFamily = &quot;Comic Sans MS&quot;; break;
        case 5: fontFamily = &quot;New Times Roman&quot;; break;
        case 6: fontFamily = &quot;Courier&quot;; break;
        case 7: fontFamily = &quot;Courier New&quot;; break;
        case 8: fontFamily = &quot;Wide Latin&quot;; break;
        }

        cout &lt;&lt;&quot;Welche Schriftfarbe m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie haben?\n&quot;;

        fontColor = colorConvert();
        system(&quot;cls&quot;);

        cout &lt;&lt;&quot;Welche Schriftgr&quot; &lt;&lt;oe &lt;&lt;sz &lt;&lt;&quot;e m&quot; &lt;&lt;oe &lt;&lt;&quot;chten Sie haben?(in Pixel)\n&quot;;
        cin &gt;&gt;fontSize;
    }

    string colorConvert()
    {
        int red, green, blue;
        stringstream color;
        system(&quot;cls&quot;);

        cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Rot?\n&quot;;
        cin &gt;&gt;red;
        cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Gr&quot;&lt;&lt;ue &lt;&lt;&quot;n?\n&quot;;
        cin &gt;&gt;green;
        cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Blau?\n&quot;;
        cin &gt;&gt;blue;

        color &lt;&lt;hex &lt;&lt;&quot;#&quot; &lt;&lt;red &lt;&lt;green &lt;&lt;blue;                // ins Hex-Format
        system(&quot;cls&quot;);

        return color.str();
    }
    void giveOptions()                            // zeigt Optionen an, die man machen kann und
    {                                            // führt die entsprechende Funktion aus
        int eingabe;

        cout &lt;&lt;&quot;Was wollen Sie als n&quot; &lt;&lt;ae &lt;&lt;&quot;chstes machen?\n\n&quot;;
        cout &lt;&lt;&quot;1 = Titel, Beschreibung, Schl&quot; &lt;&lt;ue &lt;&lt;&quot;sselw&quot; &lt;&lt;oe &lt;&lt;&quot;rter &quot; &lt;&lt;ae &lt;&lt;&quot;ndern.\n&quot;;
        cout &lt;&lt;&quot;2 = Stil der Seite &quot; &lt;&lt;ae &lt;&lt;&quot;nderen.\n&quot;;
        cout &lt;&lt;&quot;3 = Objekt hinzuf&quot; &lt;&lt;ue &lt;&lt;&quot;gen.\n&quot;;
        cout &lt;&lt;&quot;4 = Credits sehen.\n&quot;;
        cout &lt;&lt;&quot;5 = Speichern.\n&quot;;
        cin &gt;&gt;eingabe;

        switch(eingabe)
        {
        case 1:
            system(&quot;cls&quot;);            // WICHTIG: Hier system(&quot;cls&quot;); immer als erstes
            stdOptions();
            giveOptions();            // Zurück zu den Optionen
            break;
        case 2:
            system(&quot;cls&quot;);            // hier kein giveOptions(f), sonst rekursiever Überlauf WICHTIG: Muss in die
            styleOptions();            // saveFile()!
            break;
        case 3:
            system(&quot;cls&quot;);
            giveOptions();
            break;
        case 4:
            system(&quot;cls&quot;);
            giveOptions();
            break;
        case 5:
            system(&quot;cls&quot;);
            giveOptions();
            break;
        default:
            system(&quot;cls&quot;);
            cout &lt;&lt;&quot;Falsche Eingabe!\n&quot;;
            giveOptions();
            break;
        }
    }
};

class definedStyle
{
private:
    bool isSelected[20];                // prüft ob der Code selektiert ist
    string nameCurrentStyle;            // Name des aktuellen Styls (Style werden sofort gespeichert!)
    string currentStyleCode;            // Zusammengefügter Code aus dem aktuellen Style (wird großer Code!)
    string styleCodes[20];                // Style Codes als Array und dynamischer Speicher (viele Codes!)
    string rollOverCode;
public:
    definedStyle()
        : nameCurrentStyle(&quot;&quot;)
    {
        for (int i; i &lt; 21; ++i)
        {
            isSelected[i] = false;                                    // alle isSelected auf false setzen (zur Sicherheit!)
        }

        // Codes für die Styles definieren
        styleCodes[0] = &quot;font-style:italic;\n&quot;;                        // Kursiv
        styleCodes[1] = &quot;font-weight: bold;\n&quot;;                        // Fett
        styleCodes[2] = &quot;border-bottom:&quot;;                            // + colorConvert + Rahmen Style + Dicke des Rahmens in px
        styleCodes[3] = &quot;background-color:#&quot;;                        // Hintergrund-Farbe WICHTIG: Muss noch colorConvert gemacht werden!
        styleCodes[4] = &quot;color:#&quot;;                                    // WICHTIG: Muss noch colorConvert gemacht werden!
        styleCodes[5] = &quot;font-size:&quot;;                                // Größe in px muss noch erfragt werden!
        styleCodes[6] = &quot;text-decoration:blink;\n&quot;;
        styleCodes[7] = &quot;text-decoration:line-through;\n&quot;;            // Kann nicht mit anderer Text-Decoration kooperieren!
        styleCodes[8] = &quot;word-spacind:&quot;;                            // Noch Abstand in px
        styleCodes[9] = &quot;letter-spacing:&quot;;                            // Noch Abstand in px
        styleCodes[10] = &quot;text-shadow: 3px 2px #&quot;;                    // Schatten 1 + colorConvert
        styleCodes[11] = &quot;text-shadow: 3px 2px 4 px #&quot;;                // Schatten 2 + colorConvert
        styleCodes[12] = &quot;border-top: &quot;;                            // + colorConvert + Rahmen Style + Dicke des Rahmens in px
        styleCodes[13] = &quot;font-family:'Courier New';\n&quot;;            // Andere Font
        styleCodes[14] = &quot;direction:rtl;\nunicode-bidi:bidi-override;\ntext-align:left;\n&quot;;        // Umgekehrt
        styleCodes[15] = &quot;border:&quot;;                                    // + colorConvert + Rahmen Style + Dicke des Rahmens in px
        // hier kommen alle Rollover, diese kommen in den :hover, alle davor in den normalen!!!
        styleCodes[16] = &quot;color:#&quot;;                                    // colorConvert bitte!
        styleCodes[17] = &quot;border-bottom:&quot;;                            // + colorConvert + Rahmen Style + Dicke des Rahmens in px
        styleCodes[18] = &quot;background-color:#&quot;;                        // colorConvert bitte!
        styleCodes[19] = &quot;border:&quot;;                                    // + colorConvert + Rahmen Style + Dicke des Rahmens in px
    }

    ~definedStyle()
    {
        // delete currentStyleCode;            // da dynamischer Speicher
    }

    void defineStyle(html f)
    {
        cout &lt;&lt;&quot;Wie soll der neu Style hei&quot; &lt;&lt;sz &lt;&lt;&quot;en?\n&quot;;
        cin &gt;&gt;nameCurrentStyle;
        cout &lt;&lt;&quot;Hier eine kleine Vorschau m&quot; &lt;&lt;oe &lt;&lt;&quot;glicher Styles...\n&quot;;
        system(&quot;pause&quot;);
        system(&quot;start C:/HtmlManager/styles/preview.html&quot;);                        // starten der Html-Styles Vorschau
        system(&quot;cls&quot;);                                                            // nochmal clrscr

        int eingabe;                                                            // die Eingabe des Users
        cout &lt;&lt;&quot;Welche Stile sollen in Ihren Style eingebunden werden?\n&quot;;
        cout &lt;&lt;&quot;1 = Kursiver Stil\n&quot;;
        cout &lt;&lt;&quot;2 = Fetter Stil\n&quot;;
        cout &lt;&lt;&quot;3 = Unterstrichener Stil\n&quot;;
        cout &lt;&lt;&quot;4 = Hintergrundfarbener Stil\n&quot;;
        cout &lt;&lt;&quot;5 = Schriftfarbener Stil\n&quot;;
        cout &lt;&lt;&quot;6 = Kleine Schrift Stil\n&quot;;
        cout &lt;&lt;&quot;7 = Blinkender Stil\n&quot;;
        cout &lt;&lt;&quot;8 = Durchgestrichener Stil\n&quot;;
        cout &lt;&lt;&quot;9 = Wort Abstand Stil\n&quot;;
        cout &lt;&lt;&quot;10 = Buchstaben Abstand Stil\n&quot;;
        cout &lt;&lt;&quot;11 = Schatten Abstand Stil 1\n&quot;;
        cout &lt;&lt;&quot;12 = Schatten Abstand Stil 2\n&quot;;
        cout &lt;&lt;&quot;13 = &quot; &lt;&lt;UE &lt;&lt;&quot;berstrichener Stil\n&quot;;
        cout &lt;&lt;&quot;14 = Codierter Stil&quot;;
        cout &lt;&lt;&quot;15 = Umgekehrter Stil\n&quot;;
        cout &lt;&lt;&quot;16 = Rahmen Stil\n&quot;;
        cout &lt;&lt;&quot;17 = Rollover Stil 1\n&quot;;
        cout &lt;&lt;&quot;18 = Rollover Stil 2\n&quot;;
        cout &lt;&lt;&quot;19 = Rollover Stil 3\n&quot;;
        cout &lt;&lt;&quot;20 = Rollover Stil 4\n&quot;;
        cout &lt;&lt;&quot;21 = Style speichern\n&quot;;
        cin &gt;&gt;eingabe;

        switch (eingabe)
        {
        case 1:
            if (isSelected[0])
                break;
            isSelected[0] = true;                // Style 1 ist hinzugefügt
            if (isSelected[0])
                currentStyleCode += styleCodes[0];
            break;
        case 2:
            isSelected[1] = true;                // Style 2 ist hinzugefügt
            break;
        case 3:
            isSelected[2] = true;                //...
            break;
        case 4:
            isSelected[3] = true;
            break;
        case 5:
            isSelected[4] = true;
            break;
        case 6:
            isSelected[5] = true;
            break;
        case 7:
            isSelected[6] = true;
            break;
        case 8:
            isSelected[7] = true;
            break;
        case 9:
            isSelected[8] = true;
            break;
        case 10:
            isSelected[9] = true;
            break;
        case 11:
            isSelected[10] = true;
            break;
        case 12:
            isSelected[12] = true;
            break;
        case 13:
            isSelected[13] = true;
            break;
        case 14:
            isSelected[14] = true;
            break;
        case 15:
            isSelected[15] = true;
            break;
        case 17:
            isSelected[16] = true;
            break;
        case 18:
            isSelected[17] = true;
            break;
        case 19:
            isSelected[18] = true;
            break;
        case 20:
            isSelected[19] = true;
            break;
        case 21:                            // speichern
            break;
        default:
            system(&quot;cls&quot;);
            f.giveOptions();
            break;
        }
    }

    string colorConvert()
    {
        int red, green, blue;
        stringstream color;

        cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Rot?\n&quot;;
        cin &gt;&gt;red;
        cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Gr&quot;&lt;&lt;ue &lt;&lt;&quot;n?\n&quot;;
        cin &gt;&gt;green;
        cout &lt;&lt;&quot;Farbintensit&quot; &lt;&lt;ae &lt;&lt;&quot;t f&quot; &lt;&lt;ue &lt;&lt;&quot;r Blau?\n&quot;;
        cin &gt;&gt;blue;

        color &lt;&lt;hex &lt;&lt;&quot;#&quot; &lt;&lt;red &lt;&lt;green &lt;&lt;blue;                // ins Hex-Format
        system(&quot;cls&quot;);

        return color.str();
    }

};

void html::specialStyles()
{
			 definedStyle curr;

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1890656</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1890656</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Fri, 30 Apr 2010 20:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei nichtdeklarierter Bezeichner on Sun, 02 May 2010 12:11:51 GMT]]></title><description><![CDATA[<p>Alles klar, danke für die Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1891303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1891303</guid><dc:creator><![CDATA[C++H]]></dc:creator><pubDate>Sun, 02 May 2010 12:11:51 GMT</pubDate></item></channel></rss>