console input activation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

console input activation

Hey, i programmed a code with "cin" and the code is correct. The problem is, that i cant enter anything into the console, i only get, what my code asks me for, but i cant enter anything in. Need help, thanks a lot. Kindly

28th Oct 2023, 11:44 PM
Cihan C.
Cihan C. - avatar
8 Answers
+ 5
Cihan C. Let's see your cpp code so we can see what is occurring. Put your code in a code-bit from the c++ playground and insert it here.
29th Oct 2023, 12:46 AM
BroFar
BroFar - avatar
+ 5
Ah Cihan C. You have to enter all information from the initial console box not independently as you would elsewhere... =====Console Box===== 28 10 2023 ==================== Each input is on a different line
29th Oct 2023, 1:40 AM
BroFar
BroFar - avatar
+ 5
Cihan C. Here is what you basically have to do in sololearn std::cin >> day >> month >> year ; =====Console Box===== 28 10 2023 ==================== https://code.sololearn.com/cGEvd8r38ITE/?ref=app
29th Oct 2023, 1:50 AM
BroFar
BroFar - avatar
+ 1
Here is the Code in C++. Its the same in VS Code. On the PC ı cant enter any number. I tried it on my Smartphone and it worked, it was possible to type a number to the console as an input. #include <iostream> using namespace std; int main(){ int day; int month; int year; cout <<"type day:"; cin >> day; cout <<"the day is:" << day <<endl; cout <<"type month:"; cin >> month; cout <<"the month is:" << month <<endl; cout <<"type year:"; cin >> year; cout <<"the year is:" <<year; return 0; }
29th Oct 2023, 1:20 AM
Cihan C.
Cihan C. - avatar
0
The only Problem is the console for input on the PC. I cant type anything into the console to fullfill the "cin" Operator.
29th Oct 2023, 1:27 AM
Cihan C.
Cihan C. - avatar
0
Thanks for the correction
29th Oct 2023, 9:55 AM
Cihan C.
Cihan C. - avatar
0
The Problem is, that I cant type into the console. Do i need to install anything Else? The Code is right. In the console it asks for the day, but I can't type anything, it doesn't work.
29th Oct 2023, 9:57 AM
Cihan C.
Cihan C. - avatar
0
It works only on my smartphone, not on the PC on VS Code
29th Oct 2023, 9:57 AM
Cihan C.
Cihan C. - avatar