C++ : Create a console get_string() function (Windows 7/8/10)

Probíhá Zveřejněno před 2 lety K zaplacení v momentě doručení
Probíhá K zaplacení v momentě doručení

This project requires you to create a get_string() function that gets key presses from the windows queue (callback). Instead of relying on cin>> or threads, the function will need to check key presses in the queue and create something that looks just like cin>> but with the advantage of allowing us to continue running the rest of our code, rather than just waiting for the user to submit something.

The function will look like this:

bool get_string(sting message, string & input)

This means the function will return a bool, true if something was submitted (i.e. [enter] was pressed), and false if [enter] was not pressed. If [enter] was pressed, then whatever was found in the queue will be placed in the variable 'input' which was passed by reference. You will likely need to create a global variable to keep track of when the function is checking for user inputs, so that you can clear old key presses.

Here is an example of how the code could be used:

string myString

while(1)

{

clear_console(); // (Ignore the flicker - I can fix this later)

if(get_string("Type something: ", mySting))

{

cout << "You typed: " << myString << endl;

pause();

}

}

Remember, the get_string() function will return IMMEDIATELY, it will not wait for user input, all it does is check the queue. Also, please ensure that the function works similar to how cin>> works, allowing the use arrow keys and backspace.

Maximum budget for this project is AUD$100. Higher bids will be ignored.

To prove that you have read this message, please type "Hi Alex" at the top of your message.

C++ programování

Identifikační číslo projektu: #30062882

O projektu

7 nabídek Projekt na dálku Aktivní před 2 lety

7 Freelnceři na tento projekt zveřejňují nabídky v průměru $100

tthieu8

Hi Alex I'm interested in your project. I have experience with 5 years experience of dealing with C/C++. I can finish your project on time. I hope to work on the project with you. Regards.

$100 AUD za 2 dní
(6 Recenzí)
3.1
Wanngming

==== Able to start work right away ==== Hi Alex I have read your job specification very carefully. I have rich experiences with C++ and Algorithm. As a talented and skillful software developer, I am 100% sure to comp Další

$101 AUD za 2 dní
(4 Recenzí)
2.7
sohamparekh

Hi Alex! I have read your message, this is my bid. I am a C++ programming expert who has and have made numerous projects in this field, A recent one is a very strong chess engine written in C++. I have studied many a Další

$100 AUD za 1 den
(9 Recenzí)
2.9
NavyaRenish

Hi Alex, Hi have good experience in C++, your requirements are doable for me. You can expect the quality well tested code that follow a consistent coding style.

$100 AUD za 5 dní
(4 Recenzí)
2.6
engrfarooq04

DEAR understood the details that you want are looking for the C++ programmer i am a professional with 7+ years experience in C++ Programming I can deliver result with good quality at the right time. I'm interested to Další

$101 AUD za 7 dní
(0 Recenzí)
0.0
Pavel1Radigin

Hello I am very interested in your project. I have over 10 years of rich experience and technology in desktop app. I am proficient in C++. I've check your job requirement and can give the perfect result. If you would l Další

$100 AUD za 1 den
(0 Recenzí)
0.0
Mahagedara2000

Hi Alex i am an IT Student Who Works As A Freelancer I Am specializing on C and C++ And I Can Create This Function regards!

$101 AUD za 7 dní
(0 Recenzí)
0.0