Page 1 of 1

BEGINNER C++ STL CONTAINER STREAM I/O TUTORIAL BEGINNER C++ STL CONTAINER STREAM I/O TUTORIAL Rate Topic: -----

#1 Elcric  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 102
  • View blog
  • Posts: 453
  • Joined: 02-May 09

Posted 07 July 2009 - 08:29 AM

BEGINNER C++ STL CONTAINER STREAM I/O TUTORIAL


CONTENTS
• I. ASSUMPTIONS
• II. INTRODUCTION
• III. VOCABULARY
• IV. INSTANTIATING STREAM OBJECTS
• V. CREATING AN OUTPUT FILE
• VI. CREATING AN INPUT FILE
• VII. CREATING AN OUTPUT AND INPUT FILE
• VIII. PROGRAM ANALYSIS
• IX. SUMMARY
• X. CONTACT ME

WHAT YOU WILL LEARN IN THIS TUTORIAL

1. You will learn the basic STL container file input and output class vocabulary.

2. You will learn how to instantiate stream objects.

3. You will learn how to create an output file.

4. You will learn how to create an input file.

5. You will learn how to create an output and input file.

• I. ASSUMPTIONS

Hello; nice to meet you. Welcome to the STL container file input and output tutorial.

I assume you are either just starting to learn C++ or curious about the STL container file input and output topic.

• II. INTRODUCTION

If you are just starting to learn C++ it is a given that you are struggling to learn C++.

Why are you struggling? Most beginners struggle because they have not learned classes and pointers. The next time you are frustrated by C++, take a deep breath, relax for a moment, and then spend time reviewing everything you can about classes and pointers. Then go back and tackle the problem that caused your frustration. You will be surprised; the problem will not be as frustrating as it was the first time. Keep repeating this process each time you struggle with C++ and soon not only will you have an experts understanding of classes and pointers but you will also fall in love with C++.

This tutorial is a beginner’s refresher course on C++ STL container files input and output classes.

• III. VOCABULARY

1. What is a buffer?

Reading and writing to a disk takes a lot of program time. Stream buffers help reduce the frequency of reading and writing to disk. A stream write buffer fills and writes to the disk all at once, this cuts down on the frequency of writes to disk. In a similar fashion a stream read buffer can read large blocks of data from a disk all at once which cuts down on the frequency of reads from disk.

When a program crashes the user will run the risk of losing buffered data. Therefore, as a program designer, you should design your programs to include code which will reduce the risk of losing buffered data in the event of a program crash.

2. What is cin?

cin is an iostream object that handles input.
To facilitate concatenated input when cin encounters whitespace it assumes by default the input is complete and terminates input.
The following are the more commonly used cin member functions.

a. get()

The syntax for the get() function is as follows.

cin.get(buffer_name, number_characters_to_be_read, delimiter)

cin.get() reads characters until it gets to one fewer than its maximum number of characters or it encounters the delimiter termination character, whichever comes first. The delimiter character stays in the input buffer and the string is terminated.

cin.get() returns zero for end of file.

b. getline()

The syntax for the getline() function is as follows.

cin.getline(buffer_name, number_characters_to_be_read, delimiter)

cin.getline() reads characters until it gets to one fewer than its maximum number of characters or it encounters the delimiter termination character, whichever comes first. The delimiter character is discarded and the string is terminated.

c. ignore()

The syntax for the ignore() function is as follows.

cin.ignore(argumen1, argument2, argument3);

The cin.ignore() function can be called with no arguments, one argument, or three arguments.

When called with no arguments the cin.ignore() function default read takes and discards one character from the input buffer, the default terminator is end-of-file.

When called with one argument the cin.ignore(5) function reads and discards the argument specified number of characters.

When called with two arguments the cin.ignore(5, ‘\n’) function reads and discards the argument specified number of characters up to and including the specified delimiter whichever comes first.

d. peek()

The syntax for the peek() function is as follows.

cin.peek();

cin.peek() looks at but does not extract the next character.

e. putback()

The syntax for the putback() function is as follows.

cin.putback();

cin.putback() inserts a character into the data stream.

3. What is cout?

cout is an ostream object that handles output.

When you use cout and #include <iomanip> there are three manipulator member functions you can use to control the appearance of the output.

a. setf()

iostream objects keep track of their state by using flags. A state flag is a byte in which each individual bit is assigned a special meaning. These control flags can be set using member functions such as the setf() function. Some of the more common control flags which can be set by the setf() function are as follows:

i. cout.setf(ios::left) is used to left justify output.

ii. cout.setf(ios::right) is used to right justify output.

iii. cout.setf(ios::showpoint) is used to show the decimal point in floating point output if the number has an integral value.

iv. cout.setf(ios::uppercase) is used to show an uppercase E in exponential notation.

b. setprecision()

The syntax for the setprecision () function is as follows.

cout.setprecision(n);

Field precision is the number of digits to the right of the decimal point of a numeric value. The argument of the cout.setprecision(n) function establishes the number of digits to the right of the decimal point.

c. setw()

The syntax for the setw () function is as follows.

cout.setw(n);

The cout.setw(n) function establishes the field width or minimum number of spaces used to print the next output.

Include the null character '\0' at the end of the string when computing the setw(n) argument.

The following are other commonly used cout member functions.

a. flush()

cout << flush(); clears the buffer by writing all the data it is buffering.

b. put()

std::cout.put() is used to write a single character.

c. write()

cout.write(text, size) has two parameters. The first parameter is the buffer name that will be written from. The second parameter is the number of characters that will be written from that buffer.

d. width()

Changes the width of the very next output field and then reverts to the default.

A width that is too small will not truncate what is being displayed.

e. fill()

Pass in as a parameter the character you want used as a fill character. The new fill character remains until you change it.

Escape sequences, which start with a backslash character, \, can be included in a string to format output.

a. \n is the escape sequence for a new line.

b. \t is the escape sequence for a tab.

4. What is cerr?

Un-buffered error messages are handled by the cerr class and sent directly to the console.

5. What is clog?

Buffered error messages are handled by the cerr class and sent both to the console and to a log.

6. What are condition states?

You can use the following Boolean functions to check your program condition states.

a. eof()

The eof() function returns true if the iostream object has encountered the end of the file, EOF.

b. bad()

The bad() function returns true if you attempt an invalid operation.

c. fail()

The fail() function returns true any time bad() is true or an operation fails.

d. good()

The good() function returns true when eof() and bad() and fail() all return false.

7. What is an extractor?

Extractor refers to the class ostream << “put to” output operator points in the direction data flows.

An extraction operator takes everything up to the first whitespace.

8. What is an inserter?

Inserter refers to the class ostream >> “get from” input operator points in the direction data flows. By default >> skips leading whitespace and the insertion operation ends when you press the Enter key.

9. What is a pipe?

A pipe is a term used to describe a communication stream between programs, using the output of one program as the input for another.

10. What is a stream?

C++ input and output is based on the notion of streams moving bytes of external data to and from class objects. A stream is a sequence of bytes “consumed or input,” and “produced or output” by a program. A stream either produces or consumes information.

Each stream has a state which allows testing of the stream itself for end of file and error conditions. Testing will yield true if there have been no end of file or error conditions encountered and false otherwise. When the state is false operations on that stream have no effect until the state is reset. The clear() function can be used to reset the state.

The C++ iostream is a way of moving data to and from objects.

There are two types of streams: text and binary. By default all files are opened in text mode.

Standard input cin, standard output cout, and standard error cerr are the three basic streams.

A stream is a logical device or mental abstraction, a file is an actual device.

A file is a container you can both read from and write to.

11. What is whitespace?

Whitespace is newline character carriage returns, tab characters, and blank spaces

You can insert your own whitespace on output by writing character strings to the output.

• IV. INSTANTIATING STREAM OBJECTS

Before you can use the member functions of a class in your program you have to instantiate an object of that class in your program.

After the stream objects are associated with files, the files can be used the same as any other stream objects.

When you open a file the default is to create the file if it does not already exist and to delete the file contents if the file does already exist.

Use one of the following second arguments to the constructor of your ofstream object if you do not want the default when a file is opened:

1. ios::app

Do not truncate, append to the end of the existing file.

2. ios::ate

You start at the end of the file; however, you can write anyplace you want in the file.

3. ios::trunc

The default, file is truncated.

4. ios::nocreate

Open fails if the file does not exist.

5. ios::noreplace

Open fails if the file already exists.

Reading from or writing to a file requires 3 basic steps:

1. Open the file.

Test to make sure the file opened before you read or write the file.

2. Do all the reading or writing.

The input file that we are opening for reading must already exist.

The output file we are opening for writing does not have to exist. If it does not exist, it will be created. If the output file does already exist, and it is opened using the default settings, its previous contents will be deleted. Use one of the above second arguments to the constructor of your ofstream object if you do not want the default when you open a file.

3. Close the file.

The syntax for closing a file is as follows:

instantiated_object_name.close();

• V. CREATING AN OUTPUT FILE

An output file is used when you only want to write from your program into a file.

Step 1 Before you can use the member functions of a class in your program you have to create a stream by instantiating or declaring an object of that class in your program. The class for output is ofstream. You can use any object name you want to use.

The syntax for instantiating an object of the ofstream class is as follows:

ofstream object_name;

The attached program syntax is as follows:

ofstream myfile;

Step 2 After you create a stream by instantiating an object of the class in your program you have to associate or link that object with a file. You can use the open() function to associate the instantiated object with a file.

The complete detailed syntax for the prototype of an output file is as follows:

void ofstream::open(const char *filename, ios::openmode mode = ios::out | ios::trunc);

Because of the defaults, you will not normally see the above detailed syntax. Normally you will see the following syntax:

ofstream instantiated_object_name(“filename”);

The attached program syntax is as follows:

myfile.open ("example.txt");

Test to make sure the file opened before you write to the file.

The attached program uses the following code to check to see if the file is open:

if (myfile.is_open()){…}

After the stream object is associated with a file, the file can be used the same as any other stream object.

Examine the

void CFileManipulation::m_CreatingAnOutputFile(){…}

function in the attached program very carefully and notice the way the records were output to myfile. The output is the same as if you were printing the records to the console screen, with the exception that instead of cout the code uses the instantiated_object_name myfile.

The attached program uses the following code to close the file after it has been written to:

myfile.close();

• VI. CREATING AN INPUT FILE

An input file is used when you only want to read from a file into your program.

Step 1 Before you can use the member functions of a class in your program you have to create a stream by instantiating an object of that class in your program. The class for output is ifstream. You can use any object name you want to use.

The syntax for instantiating or declaring an object of the ifstream class is as follows:

ifstream object_name;

The syntax used in the attached program is as follows:

We have already instantiated or declared myfile to be an ofstream class object when we created the output file in the m_CreatingAnOutputFile() member function. Therefore, when you read from a file you have previously declared as an output file you can skip this step because the instantiated_object_name myfile has already been instantiated or declared.

Step 2 After you create a stream by instantiating an object of the class in your program you have to associate or link that object with a file. You can use the open() function to associate the instantiated object with a file.

The complete detailed syntax for the prototype of an input file is as follows:

void ifstream::open(const char *filename, ios::openmode mode = ios::in);

Because of the defaults, you will not normally see the above detailed syntax. Normally you will see the following syntax:

ifstream instantiated_object_name(“filename”);

The syntax used in the attached program is as follows:

ifstream myfile("example.txt");

Test to make sure the file opened before you read from the file.

The attached program uses the following code to check to see if the file is open:

if (myfile.is_open()){…}

After the stream object is associated with a file, the file can be used the same as any other stream object.

Examine the

void CFileManipulation::m_CreatingAnInputFile()

function in the attached program very carefully and notice the way the records were output to myfile. The output is the same as if you were printing the records to the console screen, with the exception that instead of cout the code uses the instantiated_object_name myfile stream as follows:

getline (myfile, line, '\n');

and

if(myfile) cout << " " << line << endl << endl;

The attached program uses the following code to close the file after it has been read from:

myfile.close();

• VII. CREATING AN OUTPUT AND INPUT FILE

An output and input file is used when you want to both write from your program into the file and read from the file into your program.

Step 1 Before you can use the member functions of a class in your program you have to create a stream by instantiating an object of that class in your program. The class for output and input is fstream. You can use any object name you want to use.

The syntax for instantiating an object of the fstream class is as follows:

fstream object_name;

Step 2 After you create a stream by instantiating an object of the class in your program you have to associate or link that object with a file. You can use the open() function to associate the instantiated object with a file.

The complete detailed syntax for the prototype of an output and input file is as follows:

void fstream::open(const char *filename, ios::openmode mode = ios::in | ios::out);

Because of the defaults, you will not normally see the above detailed syntax. Normally you will see the following syntax:

fstream instantiated_object_name(“filename”);

Test to make sure the file opened before you write to or read from the file.
bool is_open() returns true if the stream is linked to an open file and false otherwise.

After the stream object is associated with a file, the file can be used the same as any other stream object.

• VIII. PROGRAM ANALYSIS

Please copy and paste the attached program into a file your compiler can read. Then build, compile, and debug the program. Following along, back and forth, between the tutorial and your copy of the program will help you understand the program functionality.

[code]
//************************************
// BEGINNER C++ STL SET, MULTISET,
// MAP, AND MULTIMAP CONTAINER CLASSES
// FILE I/O MANIPULATION TUTORIAL
//************************************
#include <algorithm> //Provides definitions of many container algorithms.
#include <ctime>
#include <fstream> //Provides facilities for file-based input and output.
#include <iomanip> //Provides facilities to manipulate output formatting.
#include <iostream> //Provides C++ input and output fundamentals.
#include <iosfwd>
#include <istream>
#include <ostream>
#include <iterator> // ostream_iterator
#include <map> // STL classes map and multimap.
#include <math.h>
#include <set> // STL classes set and multiset.
#include <sstream> //Provides the template class std::sstream string manipulation.
#include <stddef.h>
#include <stdlib.h> // converter functions.
#include <string>
#include <vector> //Provides the container class template std::vector, a dynamic array.
#include <windows.h>
using std::istringstream; // STL classes
using std::ifstream; // STL classes
using std::string; // STL classes
using std::cout; // STL classes
using std::cin; // STL classes
using std::cerr; // STL classes
using std::map; // STL classes
using std::multimap; // STL classes

using namespace std;

//************************************
//Class CFileManipulation
//************************************
class CFileManipulation
{
private:

string Number; //Temperature equation number.
string Equation; //Temperature conversion equation.

public:

CFileManipulation() //Constructor used when neither equation number nor conversion equation are entered.
{
Number = " ";
Equation = " ";
}

CFileManipulation(string n) //Constructor used when only conversion equation number is entered.
{
Number = n; //n is the temperature conversion equation number.
Equation = " ";

}

CFileManipulation(string n, string e) //Constructor used when both equation number and conversion equation are entered.
{
Number = n;
Equation = e; //e is the temperature conversion equation.

}


string m_getNumber(); //Temperature conversion equation number.
string m_getEquation(); //Temperature conversion equation.
void m_DateTime(); //Date and time.
int m_UserLoop(); //User prompted loop.
void m_UserPause(); //Prompts the user to continue.
int m_UserMenu(); //Console menu.
int m_UserSwitch(int choice); //Switch.
void m_DisplaySet1(); //Prints set to console.
void m_CreatingAnOutputFile(); //Creates a file named example.txt.
void m_CreatingAnInputFile(); //Reads and prints a file named example.txt.
void m_SizeExampleTxtFile(); //Computes and prints the size of the example.txt file.
int m_StlFindAlgorithm(); //Searches example.txt file for a user inputted string.
};



//************************************
//Gets the temperature conversion
//equation number.
//************************************
string CFileManipulation::m_getNumber()
{

return Number;
}

//************************************
//Gets the temperature conversion
//equation.
//************************************
string CFileManipulation::m_getEquation()
{
//cout << endl << endl;
//cout << " 86 string m_getEquation()." << endl;

return Equation;
}

//************************************
//Main() function
//************************************
int main (int argc, char* argv[] )
{
int choice = 0;
bool exitt = true;

CFileManipulation OSunshine; //Instantiating OSunshine as an object of type CFileManipulation.

OSunshine.m_UserLoop();


return 0;
}

//************************************
//DateTime
//************************************
void CFileManipulation::m_DateTime()
{
cout << endl;
cout << endl;
cout << " ";
cout << __DATE__;
cout << " ";
cout << __TIME__;
cout << endl;
cout << endl;

return;
}

//************************************
//This function is the user prompted
//loop.
//************************************
int CFileManipulation::m_UserLoop()
{
int choice = 0; //Instantiates choice as an object of class type int, initializing it's value to 0.
bool exitt = false; //Instantiates exitt as an object of class type bool, initializing it's value to false.

do
{

m_UserMenu();

if (!choice)
{

cout << endl << endl << endl;
cout << " Type the number 1 and press return to run this program again." << endl << endl << endl;
cout << " Type 0 and press return to exit ==> ";

cin >> choice;
}


if (choice == 0)
{
exitt = true;
}
else
{
exitt = false;
}
}while(exitt == false);

m_UserPause();

return 0;
}

//************************************
//This function prompts the user to
//continue.
//************************************
void CFileManipulation::m_UserPause()
{
cout << endl << endl << endl;
cout << " ";
system("PAUSE");
}

//************************************
//This function prints a menu to
//the console.
//************************************
int CFileManipulation::m_UserMenu()
{


int choice = 0; //Instantiates choice as an object of class type int, initializing it's value to 0.

system("CLS");

cout << endl << endl << endl;
cout << " MENU" << endl;
cout << " ************************" << endl << endl;
cout << " 0 EXIT." << endl;
cout << " " << endl;
cout << " 1 Create example.txt file." << endl;
cout << " 2 Display example.txt file." << endl;
cout << " 3 Size example.txt file." << endl;
cout << " 4 Search example.txt file." << endl;
cout << " " << endl;
cout << " 5 Display set1." << endl << endl;

cout << " Please type a number from 0 to 5 and then press Enter ==> ";

//Get customer input.

cin >> choice;

if (choice == 0) exit(1);

m_UserSwitch(choice);

//Test validity of user input data.

return 0;
}

//************************************
//This function is a switch.
//************************************
int CFileManipulation::m_UserSwitch(int choice)
{
switch(choice)
{
//Call class member functions.

case 0:
break;

case 1:
m_CreatingAnOutputFile(); //Create new file.
cout << endl << endl << endl;
cout << " Congratulations, you created the new file." << endl << endl;
m_UserPause();
m_UserMenu();
break;

case 2:
m_CreatingAnInputFile(); //Print new file.
break;

case 3:
m_SizeExampleTxtFile(); //Size new file.
break;

case 4:
m_StlFindAlgorithm(); //Search new file.
break;


case 5:
m_DisplaySet1();
cout << endl << endl << endl;
cout << " Congratulations, you displayed set1." << endl << endl;
m_UserPause();
m_UserMenu();
break;

default:
cout << endl << endl << endl;
cout << " Please select again." << endl << endl;
break;
}

return 0;
}

//************************************
//This function sorts the set.
//************************************
bool operator < (CFileManipulation p1, CFileManipulation p2) //set initialization input sort
{

return p1.m_getNumber() < p2.m_getNumber();
}

//************************************
//This function mimics a key value pair
//when the set is output.
//************************************
ostream &operator << (ostream &os, CFileManipulation &heat) //Formatted output of set to screen
{
os << " " << heat.m_getNumber(); //Formatted output of set to screen
os << " " << heat.m_getEquation() << endl; //Formatted output to set to screen

return os;
}

//************************************
//DISPLAY SET1
//************************************
void CFileManipulation::m_DisplaySet1()
{
//Initialize the set.
set<CFileManipulation> equations;
equations.insert(CFileManipulation("37", "From Celsius To Kelvin = ((FromTemp) + (273.15))"));
equations.insert(CFileManipulation("38", "From Centigrade To Kelvin = ((FromTemp) + (273.15))"));
equations.insert(CFileManipulation("39", "From Delisle to Kelvin = (373.15 - ((FromTemp * 2) / 3))"));
equations.insert(CFileManipulation("40", "From Fahrenheit To Kelvin = (((FromTemp + 459.67) *5) /9)"));
equations.insert(CFileManipulation("41", "From Kelvin To Kelvin = FromTemp"));
equations.insert(CFileManipulation("42", "From Newton To Kelvin = (((FromTemp * 100) / 33) + 273.15)"));
equations.insert(CFileManipulation("43", "From Rankine To Kelvin = ((FromTemp * 5) / 9)"));
equations.insert(CFileManipulation("44", "From Reaumur To Kelvin = (((FromTemp * 5) / 4) + 273.15)"));
equations.insert(CFileManipulation("45", "From Romer To Kelvin = ((((FromTemp - 7.5) * 40) / 21) + 273.15)"));
equations.insert(CFileManipulation("46", "From Celsius To Newton = ((FromTemp * 33) / 100)"));
equations.insert(CFileManipulation("47", "From Centigrade To Newton = ((FromTemp * 33) / 100)"));
equations.insert(CFileManipulation("48", "From Delisle to Newton = (33 - ((FromTemp * 11) / 50))"));
equations.insert(CFileManipulation("49", "From Fahrenheit To Newton = (((FromTemp - 32) * 11) / 60)"));
equations.insert(CFileManipulation("50", "From Kelvin To Newton = (((FromTemp - 273.15) * 33) / 100)"));
equations.insert(CFileManipulation("51", "From Newton To Newton = FromTemp"));
equations.insert(CFileManipulation("52", "From Rankine To Newton = (((FromTemp - 491.67) * 11) / 60)"));
equations.insert(CFileManipulation("53", "From Reaumur To Newton = ((FromTemp * 33) / 80)"));
equations.insert(CFileManipulation("54", "From Romer To Newton = (((FromTemp - 7.5) * 22) / 35)"));
equations.insert(CFileManipulation("55", "From Celsius To Rankine = (((FromTemp * 9) / 5) + (491.67))"));
equations.insert(CFileManipulation("56", "From Centigrade To Rankine = (((FromTemp * 9) / 5) + (491.67))"));
equations.insert(CFileManipulation("57", "From Delisle to Rankine = (671.67 - ((FromTemp * 6) / 5))"));
equations.insert(CFileManipulation("58", "From Fahrenheit To Rankine = (FromTemp + 459.67)"));
equations.insert(CFileManipulation("59", "From Kelvin To Rankine = ((FromTemp * 9) / 5)"));
equations.insert(CFileManipulation("60", "From Newton To Rankine = (((FromTemp * 60) / 11) + 491.67)"));
equations.insert(CFileManipulation("61", "From Rankine To Rankine = FromTemp"));
equations.insert(CFileManipulation("62", "From Reaumur To Rankine = (((FromTemp * 9) / 4) + 491.67)"));
equations.insert(CFileManipulation("63", "From Romer To Rankine = ((((FromTemp - 7.5) * 24) / 7) + 491.67)"));
equations.insert(CFileManipulation("01", "From Celsius To Celsius = FromTemp"));
equations.insert(CFileManipulation("02", "From Centigrade To Celsius = FromTemp"));
equations.insert(CFileManipulation("03", "From Delisle to Celsius = (100 - ((FromTemp * 2) / 3))"));
equations.insert(CFileManipulation("04", "From Fahrenheit To Celsius = (((FromTemp - 32) * 5) / 9)"));
equations.insert(CFileManipulation("05", "From Kelvin To Celsius = (FromTemp - 273.15)"));
equations.insert(CFileManipulation("06", "From Newton To Celsius = ((FromTemp * 100) / 33)"));
equations.insert(CFileManipulation("07", "From Rankine To Celsius = (((FromTemp - 491.67) * 5) / 9)"));
equations.insert(CFileManipulation("08", "From Reaumur To Celsius = ((FromTemp * 5) / 4)"));
equations.insert(CFileManipulation("09", "From Romer To Celsius = (((FromTemp - 7.5) * 40) / 21)"));
equations.insert(CFileManipulation("10", "From Celsius To Centigrade = FromTemp"));
equations.insert(CFileManipulation("11", "From Centigrade To Centigrade = FromTemp"));
equations.insert(CFileManipulation("12", "From Delisle to Centigrade = (100 - ((FromTemp * 2) / 3))"));
equations.insert(CFileManipulation("13", "From Fahrenheit To Centigrade = (((FromTemp - 32) * 5) / 9)"));
equations.insert(CFileManipulation("14", "From Kelvin To Centigrade = (FromTemp - 273.15)"));
equations.insert(CFileManipulation("15", "From Newton To Centigrade = ((FromTemp * 100) / 33)"));
equations.insert(CFileManipulation("16", "From Rankine To Centigrade = (((FromTemp - 491.67) * 5) / 9)"));
equations.insert(CFileManipulation("17", "From Reaumur To Centigrade = ((FromTemp * 5) / 4)"));
equations.insert(CFileManipulation("18", "From Romer To Centigrad = (((FromTemp - 7.5) * 40) / 21)"));
equations.insert(CFileManipulation("19", "From Celsius To Delisle = (((100 - FromTemp) * 3) / 2)"));
equations.insert(CFileManipulation("20", "From Centigrade To Delisle = (((100 - FromTemp) * 3) / 2)"));
equations.insert(CFileManipulation("21", "From Delisle to Delisle = FromTemp"));
equations.insert(CFileManipulation("22", "From Fahrenheit To Delisle = (((212 - FromTemp) * 5) / 6)"));
equations.insert(CFileManipulation("23", "From Kelvin To Delisle = (((373.15 - FromTemp) * 3) / 2)"));
equations.insert(CFileManipulation("24", "From Newton To Delisle = (((33 - FromTemp) * 50) / 11)"));
equations.insert(CFileManipulation("25", "From Rankine To Delisle = (((671.67 - FromTemp) * 5) / 6)"));
equations.insert(CFileManipulation("26", "From Reaumur To Delisle = (((80 - FromTemp) * 15) / 8)"));
equations.insert(CFileManipulation("27", "From Romer To Delisle = (((60 - FromTemp) * 20) / 7)"));
equations.insert(CFileManipulation("28", "From Celsius To Fahrenheit = (((FromTemp * 9) / 5) + 32)"));
equations.insert(CFileManipulation("29", "From Centigrade To Fahrenheit = (((FromTemp * 9) / 5) + 32)"));
equations.insert(CFileManipulation("30", "From Delisle to Fahrenheit = (212 - ((FromTemp * 6) / 5))"));
equations.insert(CFileManipulation("31", "From Fahrenheit To Fahrenheit = FromTemp"));
equations.insert(CFileManipulation("32", "From Kelvin To Fahrenheit = (((FromTemp * 9) / 5) - 459.67)"));
equations.insert(CFileManipulation("33", "From Newton To Fahrenheit = (((FromTemp * 60) / 11) + 32)"));
equations.insert(CFileManipulation("34", "From Rankine To Fahrenheit = (FromTemp - 459.67)"));
equations.insert(CFileManipulation("35", "From Reaumur To Fahrenheit = (((FromTemp * 9) / 4) + 32)"));
equations.insert(CFileManipulation("36", "From Romer To Fahrenheit = ((((FromTemp - 7.5) * 24) / 7) + 32)"));
equations.insert(CFileManipulation("64", "From Celsius To Reaumur = ((FromTemp * 4) / 5)"));
equations.insert(CFileManipulation("65", "From Centigrade To Reaumur = ((FromTemp * 4) / 5)"));
equations.insert(CFileManipulation("66", "From Delisle to Reaumur = (80 - ((FromTemp * 8) / 15))"));
equations.insert(CFileManipulation("67", "From Fahrenheit To Reaumur = (((FromTemp - 32) * 4) / 9)"));
equations.insert(CFileManipulation("68", "From Kelvin To Reaumur = (((FromTemp - 273.15) * 4) / 5)"));
equations.insert(CFileManipulation("69", "From Newton To Reaumur = ((FromTemp * 80) / 33)"));
equations.insert(CFileManipulation("70", "From Rankine To Reaumur = (((FromTemp - 491.67) * 4) / 9)"));
equations.insert(CFileManipulation("71", "From Reaumur To Reaumur = FromTemp"));
equations.insert(CFileManipulation("72", "From Romer To Reaumur = (((FromTemp - 7.5) * 32) / 21)"));
equations.insert(CFileManipulation("73", "From Celsius To Romer = (((FromTemp * 21) / 40) + 7.5)"));
equations.insert(CFileManipulation("74", "From Centigrade To Romer = (((FromTemp * 21) / 40) + 7.5)"));
equations.insert(CFileManipulation("75", "From Delisle to Romer = (60 - ((FromTemp * 7) / 20))"));
equations.insert(CFileManipulation("76", "From Fahrenheit To Romer = ((((FromTemp - 32) * 7) / 24) + 7.5)"));
equations.insert(CFileManipulation("77", "From Kelvin To Romer = ((((FromTemp - 273.15) * 21) / 40) + 7.5)"));
equations.insert(CFileManipulation("78", "From Newton To Romer = (((FromTemp * 35) / 22) + 7.5)"));
equations.insert(CFileManipulation("79", "From Rankine To Romer = ((((FromTemp - 491.67) * 7) / 24) + 7.5)"));
equations.insert(CFileManipulation("80", "From Reaumur To Romer = (((FromTemp * 21) / 32) + 7.5)"));
equations.insert(CFileManipulation("81", "From Romer To Romer 

Is This A Good Question/Topic? 0
  • +

Page 1 of 1