I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
COST (GBP)
this unit 0.76
sub units 0.00
+
0
UnitsConvert

temperature

Temperature units in imperial and SI units
Controller: will

add cart

Interface

C++

Temperature

 
doubletemperaturedoublenumber
unitsfrom_unit
unitsto_unit )
Converts a numbers from one temperature unit to another.

Example 1

#include <iostream>
#include <codecogs/units/convert/temperature.h>
 
using namespace Units::Convert;
int main()
{
  std::cout << "temperature(37,unit_C, unit_K)=" << temperature(37,unit_C, unit_K);
 
  return 0;
}
Output:
temperature(37,unit_C, unit_K)= 98.6

Parameters

numberthe value in from_unit 's to convert
from_unitan enumerated value of the initial temperature type
to_unitan emuerated value of the output temperature type

Returns

the value in the converted unit.
Source Code

Source code is available when you buy a Commercial licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.


Other Documentation

The standard measurement units are:

Unit names Alternate names / spellings Abbreviation Enumeration Code Conversion Rate (relative to first unit)
Temperature
Celsius deg C C unit_C 1
Fahrenheit deg F F unit_F 1.8
Kelvin deg K K unit_K 1
Source Code

Source code is available when you buy a Commercial licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.