Hi There Not sure if anyone has time to help me but I Am looking for a tutorial to wright a program that counts the time between a switch been pressed and then pressed for a second time with a .txt output any help would be much appreciated
Thanks for this it was intresting to read but i am rely new to this and was looking for more of a guid through building the program thanks for your time tho
@miinipaa, in, first link example what is "volatile double" the example had problem in Visual studio2012,
second link example doesn't run even in cpp.sh !
Something that is used here to prevent optimisation and le time actually pass. It has no relation to time() and difftime() functions. Basically all you need to know to use it was written before.
Second example uses std::put_time which still not supported by many compilers. As before, you do not need it as it has no relation to actual time conputing.
type identifier is another way to say type namevolatile is a type qualifiers or type modifier (There are two of them, second one is const).
So volatile type identifier would be name of the type with volatile qualifier applied.
Note that identifier can refer to many things. Most often it is used to denote variable name. Do not get confused.