hi, i am very new to C++, i know almost nothing, how do i get the compiler to accept time as an input from a user.??????
I have to write a program to calculate the time distace given 2 times

Recommended Answers

All 5 Replies

Read the input as a string and parse it into hours, minutes, whatever.

Read the input as a string and parse it into hours, minutes, whatever.

Parse??? How do i do that!?

Parse??? How do i do that!?

Many ways; sscanf comes to mind.

Many ways; sscanf comes to mind.

i can use scanf - however i have no idea how to use tm_mins format into the scan f statement all the attempts i made the compiler has rejected

i can use scanf - however i have no idea how to use tm_mins format into the scan f statement all the attempts i made the compiler has rejected

I can't read your mind, nor can I see your code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.