I’m trying to solve this problem by running this code; however, online judge says I had a timeout on only one of the tests, in which big numbers are used. How to make this code more efficient such as not to get a timeout? #include <iostream> using namespace std; int main() { int n,c=0; cin ..
Category : console-application
I am developing a C# Console app in vscode, which should: send a Notification (src) containing a Reply Input Box (src) (works) react to the callback when the use enters text and presses reply (fails) The problem I am facing is, that i am not able to extract the userinput from the input text in ..
I’m making a text-based console game. The Chinese input method is annoying as it blocks normal key input. I tried to send NULL to ImmAssociateContext but it doesn’t work. #include<Windows.h> #include <imm.h> #include <atlstr.h> #include<handleapi.h> #include<iostream> #pragma comment ( lib,"imm32.lib" ) using namespace std; int main(int argc, char* argv[]) { SetConsoleTitle(TEXT("test")); char ch; ImmAssociateContext(FindWindow(NULL, TEXT("test")), ..
I am working on a toy project. Basically, it’s a set of classes and functions for making games that run in terminal. I want to use ANSI escape codes to change text color, style, background color and etc. I am trying to input shapes and colors from text files. I’m storing them in a class, ..
I need to make console tic tac toe game in one function. I successfully made game procces(choose place to put O or X), but I stucked on win/tie method. I was trying to make tie by checking for free space and it isn’t exists there is a tie, but it’s only made problem bigger. All ..
I am trying to obtain the date from CLI. However, I am first getting it as a string because the program misbehaves when I input in some invalid value e.g., a string while using std::cin >> directly on an int. Here is my code so far and it is not behaving as expected. After entering ..
I recently developed a console app where you can login and register and now i want to move on to the after log-in part. I want the user to have , let’s say 3 options: 1.Open password generator 2.Post 3. Log out If he presses 1 for ex, I want a new console to pop ..
I’m currently working on a basic c++ windows console app which calls a DLL. The thing is that the DLL prints information, usually, I use this DLL with graphical apps (such as games). The prints are useful when these graphical apps enable their "debug" mode that opens a console. But in this case, my console ..
the code is supposed to make a menu where you can go from ption to option using Z and S (i use azerty keyboard so i can’t use WASD) and for some reason instead of highlighting only one option it highlights them all here is the entirety of the code #include <iostream> #include <windows.h> #include ..
I’m trying to create a Kotlin console app using IntelliJ Idea. For some reason it doesn’t run as a console app. I’m using IntelliJ IDEA 2020.3.1 (Community Edition) on Windows 10. What I do is as follows – I create a new Kotlin project out of the "Console Application" template. I choose openjdk-15 as the ..
Recent Comments