Click here to Skip to main content
15,889,034 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionsimple interpreter Pin
harcaype22-Oct-08 4:56
harcaype22-Oct-08 4:56 
AnswerRe: simple interpreter Pin
Mark Salsbery22-Oct-08 5:26
Mark Salsbery22-Oct-08 5:26 
GeneralRe: simple interpreter Pin
CPallini22-Oct-08 9:26
mveCPallini22-Oct-08 9:26 
AnswerRe: simple interpreter Pin
CPallini22-Oct-08 9:30
mveCPallini22-Oct-08 9:30 
AnswerRe: simple interpreter Pin
David Crow22-Oct-08 10:02
David Crow22-Oct-08 10:02 
GeneralRe: simple interpreter Pin
harcaype23-Oct-08 2:10
harcaype23-Oct-08 2:10 
QuestionRe: simple interpreter [modified] Pin
David Crow23-Oct-08 2:54
David Crow23-Oct-08 2:54 
AnswerRe: simple interpreter Pin
harcaype23-Oct-08 4:23
harcaype23-Oct-08 4:23 
wait. im sorry about that. this is the right code.

#include<iostream>
#include<stack>
#include<string>
using namespace std;

int main(){
stack<string> syntax;
string word;

while (cin >> word)
{
syntax.push(word);
}

cout << "Number of words: " << syntax.size() << endl;

while(!syntax.empty())
{
cout << syntax.top() << endl;
syntax.pop();
}

cout.flush();
return 0;
}
QuestionControl outgoing TCP/IP connections Pin
od@ananzi.co.za22-Oct-08 4:23
od@ananzi.co.za22-Oct-08 4:23 
AnswerRe: Control outgoing TCP/IP connections Pin
Richard Andrew x6422-Oct-08 18:00
professionalRichard Andrew x6422-Oct-08 18:00 
Questioncovert / cast int to char* with a twist Pin
Programm3r22-Oct-08 4:22
Programm3r22-Oct-08 4:22 
AnswerRe: covert / cast int to char* with a twist Pin
James R. Twine22-Oct-08 5:08
James R. Twine22-Oct-08 5:08 
AnswerRe: covert / cast int to char* with a twist Pin
Mark Salsbery22-Oct-08 5:12
Mark Salsbery22-Oct-08 5:12 
QuestionHo wto close running application before uninstallation?? Pin
tarunclassic22-Oct-08 3:46
tarunclassic22-Oct-08 3:46 
AnswerRe: Ho wto close running application before uninstallation?? Pin
Richard Andrew x6422-Oct-08 17:58
professionalRichard Andrew x6422-Oct-08 17:58 
GeneralRe: How to close running application before uninstallation?? Pin
tarunclassic22-Oct-08 19:54
tarunclassic22-Oct-08 19:54 
QuestionDLL preferred load address Pin
George_George22-Oct-08 3:34
George_George22-Oct-08 3:34 
AnswerRe: DLL preferred load address Pin
Simon P Stevens22-Oct-08 3:48
Simon P Stevens22-Oct-08 3:48 
GeneralRe: DLL preferred load address Pin
George_George22-Oct-08 15:20
George_George22-Oct-08 15:20 
GeneralRe: DLL preferred load address Pin
Naveen22-Oct-08 15:40
Naveen22-Oct-08 15:40 
GeneralRe: DLL preferred load address Pin
George_George22-Oct-08 16:05
George_George22-Oct-08 16:05 
GeneralRe: DLL preferred load address Pin
Naveen22-Oct-08 16:19
Naveen22-Oct-08 16:19 
GeneralRe: DLL preferred load address Pin
George_George22-Oct-08 17:37
George_George22-Oct-08 17:37 
AnswerRe: DLL preferred load address Pin
Iain Clarke, Warrior Programmer22-Oct-08 3:50
Iain Clarke, Warrior Programmer22-Oct-08 3:50 
GeneralRe: DLL preferred load address Pin
George_George22-Oct-08 15:30
George_George22-Oct-08 15:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.