0

Input on Console in VS Code don't work.

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. I cant type anything into the console to fullfill the "cin" Operator. It works only on my smartphone, not on the PC on VS CodeHere 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; }

30th Oct 2023, 1:01 AM
Cihan C.
Cihan C. - avatar
2 Antworten
+ 5
VSCode is basically only a text editor. You need to have a C++ compiler installed as well. See this article for more details and follow the links to install a compiler appropriate for your system. https://code.visualstudio.com/docs/languages/cpp
30th Oct 2023, 1:10 PM
Tibor Santa
Tibor Santa - avatar
0
Download sublime text on your laptop you can download it easily and your code will work or you can download any other apps and in vs code it's a problem in python
31st Oct 2023, 4:15 PM
zarifa shaikh
zarifa shaikh - avatar