+ 2
why the second cin gets skipped?
just fed off with this cin keyword! #include <iostream> using namespace std; int main() { char nameM; char nameW; cout<<"Enter your name:\t"; cin>>nameM; cout<<"choose your partner\t:"; cin>>nameW; return 0; } output: enter your name: abcd choose your partner: (skipped)
5 odpowiedzi
+ 16
In Sololearn code playground you have to give all the inputs at the same time.. So you will have to type
name1 name2. //seperated by space
OR
name1
name2 //seperated by line
+ 1
well i use code blocks and there too same problems persists. what is the reason behind its skipping? I am working on a program where both inputs cant be given at same time.This was just a little example to make the quesion more clear.
+ 1
On SoloLearn's Code Playground the input function says "Split multiple inputs into separate lines"... Press enter for each cin