Category : stdin

I would like to know how to catch keypress in c++ from terminal. Back in nodejs I would do: process.stdin.setRawMode(true); process.stdin.on(code => […stuff]); Now how would I do that in c++. Rules: It has to not block the main thead (if posible). It has to work with soft keyboard (e.g. mobile device’s keyboard). It has ..

Read more

I’ve used this repository which is a Boost.Asio like structure that implements messaging and double ended queue and client and server communication in c++. The problem is, it written for windows and in the file SimpleClient.cpp, reads keypress from command line, now I want to read command line keypress on Ubuntu terminal therefore I found ..

Read more

I’m working on a programming problem in C++, where I need to write a CSV parser. I’ve written this before for files, but the instructions state: Input is provided as CSV format via STDIN. The first line is a header. The subsequent lines are data. Here’s an example of the input "file": #id,time,amount 0,4,5 2,8,3 ..

Read more