Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication11.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <string>
- #include <iostream>
- #include <fstream>
- using namespace std;
- class Temp {
- public:
- int Nums;
- double val;
- char M;
- Temp() {};
- //Temp(int num, double Val, int mm) :Nums(num), val(Val), M(mm) {}
- //Temp() :Nums(1), val(1.001), M('K') {}
- void Num(int ExNum)
- {
- Nums = ExNum;
- }
- int GetNum()
- {
- return Nums;
- }
- void Value(double value)
- {
- val = value;
- }
- double getval()
- {
- return val;
- }
- void meas(char c)
- {
- M = c;
- }
- char gm()
- {
- return M;
- }
- };
- ostream& operator<< (ostream& os, const Temp& tm)
- {
- os << tm.Nums << " - number of your experiment" << endl << tm.val << " - your temperature's value " << endl << tm.M << " - your measure";
- return os;
- }
- istream& operator>> (istream& is, Temp& tm)
- {
- is >> tm.Nums >> tm.val >> tm.M;
- return is;
- }
- int main() {
- Temp temp1;
- cin >> temp1;
- string in;
- cout << "enter type of input: (file/keyboard) ";
- cin >> in;
- while (in != "file"&&in != "keyboard")
- {
- cout << "enter way of input: (file/keyboard) ";
- cin >> in;
- }
- if (in == "keyboard")
- {
- cout << "";
- cout << endl;
- }
- else
- {
- ifstream fin;
- fin.open("input.txt");
- ofstream fout;
- fout.open("output.txt");
- //fin >> "";
- fout << "";
- fin.close();
- fout.close();
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment