C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Probleme mit std::stack

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (German)
View previous topic :: View next topic  
Author Message
Sven Kleine.
Guest





PostPosted: Tue Apr 13, 2004 8:00 pm    Post subject: Probleme mit std::stack Reply with quote



Hi

ich habe ein Problem mit der Benutzung von std::stack

comand.h:

#include <stack>

class ComandDecode {
/* Klassenkommentar
* Die Klasse stellt Funktionen bereit einen Befehl abzuarbeiten
* übergeben wird der Wert für die Funktion
*/

//Konstante für das W Reister
const unsigned int i_W;

// Speicher incl W Register erstellen
Memory picmemory;

// Den Stack erstellen
std::stack <int> s_picstack;

// Befehl ADDWF
// Add W and f
unsigned int comandAddwf(unsigned int f, bool d);
};

Wenn ich das kompiliere bekomme ich sobald ich hier die Zeile std::stack
<int> s_picstack; enthalten ist
von MVisual Studio den Fehler C:ProgrammeMicrosoft Visual Studio
..NETVc7includeyvals.h(8Cool:
error C2143: syntax error : missing ';' before 'namespace'

was mache ich falsch?

mfg Sven

--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
Back to top
Werner Salomon
Guest





PostPosted: Wed Apr 14, 2004 2:07 pm    Post subject: Re: Probleme mit std::stack Reply with quote



"Sven Kleine." <win95total (AT) gmx (DOT) net> wrote

Quote:
ich habe ein Problem mit der Benutzung von std::stack

comand.h:

#include <stack

[...]

Wenn ich das kompiliere bekomme ich sobald ich hier die Zeile std::stack
int> s_picstack; enthalten ist
von MVisual Studio den Fehler C:ProgrammeMicrosoft Visual Studio
.NETVc7includeyvals.h(8Cool:
error C2143: syntax error : missing ';' before 'namespace'

was mache ich falsch?

Hallo Sven,

mit großer Wahrscheinlichkeit hast Du in einer anderen H-Datei, die
vor comand.h in Deiner Cpp-Datei inkludiert wird, am Ende das ';'
vergessen.

Gruß
Werner
PS.: das Komando; engl.: the command - mit 2'm'

--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de

Back to top
Thomas Maeder
Guest





PostPosted: Wed Apr 14, 2004 4:39 pm    Post subject: Re: Probleme mit std::stack Reply with quote



"Sven Kleine." <win95total (AT) gmx (DOT) net> writes:

Quote:
#include
class ComandDecode {
/* Klassenkommentar
* Die Klasse stellt Funktionen bereit einen Befehl abzuarbeiten
* übergeben wird der Wert für die Funktion
*/

//Konstante für das W Reister
const unsigned int i_W;

// Speicher incl W Register erstellen
Memory picmemory;

Der Name Memory ist hier nicht deklariert.

--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de

Back to top
Sven Kleine.
Guest





PostPosted: Wed Apr 14, 2004 5:03 pm    Post subject: Re: Probleme mit std::stack Reply with quote

Hi Werner
Quote:
mit großer Wahrscheinlichkeit hast Du in einer anderen H-Datei, die
vor comand.h in Deiner Cpp-Datei inkludiert wird, am Ende das ';'
vergessen.

Deine Kristallkugel ist super. Genau das war es. Hätte ich nie gefunden aber
es hätte mich eigentlich schon stuzigmachen müssen das er an anderer Stelle
genau nach include ein ; haben wollte.



Quote:
Gruß
Werner
PS.: das Komando; engl.: the command - mit 2'm'

Ich weiß habe jetzt aber nach deinem Hinweis gesehen das genau die ersten
2 Funktionen in meiner Klasse nur mit
einem m geschrieben habe. Bei der Klasse war es Absicht.

mfg Sven

--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.