I am currently writing a program that can calculate the number of total seconds in a user given number of hours, minutes, and seconds (in that order in hh:mm:ss format hh, mm, and ss being any number from 0-99). I'm not really worried for checking for errors in user input, I'm more concerned with the user inputing code into the console in that format (hh:mm:ss).
How To Get Rid Of Block Cursor In Dev C 4
Example:
Enter time in format hh:mm:ss: 2:15:30
Number of seconds is 8130
Enter time in format hh:mm:ss: 2:15:30
Number of seconds is 8130
This is my program so far:
The output currently looks something like this:
Can anyone tell me how to disable blinkin cursor from my WIN32 console Application. I have created a console app. Using vc but i see the cursor blinkin all the time which is not what i want. But could you please give me an example. Please take a look at this code. Switch (prevdir) case 1. Jan 20, 2013 Can anyone help me with showing/hiding cursor? I tried, but with no success. It would be wonderful if you could help me. Please, if anyone will be able to help me, write the entire code. Thanks in advance.
Welcome to Second Calculator.
Enter the number of hours, minutes, and seconds (in that order):
2
15
30
From the given 2:15:30 the total number of seconds is equal to: 8130
Press any key to continue...
Enter the number of hours, minutes, and seconds (in that order):
2
15
30
From the given 2:15:30 the total number of seconds is equal to: 8130
Press any key to continue...
I've looked around and from what I have read I would need to move the cursor in the console, but that's a tad advanced for what little I've learned so far.
I'm not sure if maybe I have to do something with some string operations and somehow find and store the three values from the user input. I've tried outputing ':' after each input, but the console places new lines after each input and it just ends up looking like a wierd ladder:
2
:15
:30
:15
:30
Any help in steering me in the right direction or assisting in how to figure this out is greatly appreciated.
How To Get Rid Of Block Cursor In Dev C Free
- 4 Contributors
- forum 6 Replies
- 7,382 Views
- 11 Hours Discussion Span
- commentLatest Postby mrnuttyLatest Post
Red Goose21
Don't hit enter after each input. Enter literally tells the console to make a new line. A simple space will suffice to separate the variables.
Edited by Red Goose: n/a