Ich wollte ein wenig C++ testen.
Warum gibt mir das Programm nur das 2te Wort aus?
Das Programm ist in der zip-Datei.
c++Konsolen eingabe
-
senden9 -
16. September 2009 um 22:01
-
-
C
Alles anzeigen#include <string> #include <iostream> using namespace std; int main() { //declares vars string input1; string input2; //block one cout<<"Userinput 1: "; cin>>input1; //block two cout<<"Userinput 2: "; cin>>input2; //console out the inputs cout<<"You typed the following as 1st input: "<<input1<<"\nYou typed the following as 2nd input: "<<input2; //intercept inputs cin.get(); //init break cin.get(); }