Solved

Convertions in C++

Posted on 2012-04-09
2
167 Views
Last Modified: 2012-04-09
There are sometimes easy conversions that you can do it yourself. But is there a std. C++ conversion class (or classes) that I can use to convert units.

For example if I want to covert Hz to milliseconds whats the best approach? Iike I said I can do the conversion statements myself; but I am looking for an existing C++ class/lib so that I could use that instead of reinventing the wheel.
0
Comment
Question by:prain
2 Comments
 
LVL 20

Accepted Solution

by:
n2fc earned 100 total points
ID: 37823397
The Code Project has some libraries for this...

See: http://www.codeproject.com/Articles/23087/Measurement-Unit-Conversion-Library

PS: Hz is a unit of INVERSE time!  Thus, it will not convert to ms!
0
 

Author Closing Comment

by:prain
ID: 37824693
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now