1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#include<iostream>
#include<cmath>
#include<math.h>
#include<fstream>
#include<string>
using namespace std;
void timber_type()
{
float bending_strength, tension_parallel, tension_perpendicular,compression_parallel, compression_perpendicular, shear;
int timber_class;
cout<<"Please input type of soft timber (C14, C16, C18, C20, C22, C24, C27, C30, C35, C40, C45, C50). "
<<"(Enter value and press enter.)"<<endl;
cout<<"C";
cin>>timber_class;
ifstream myfile;
myfile.open("TextFile1.txt");
string array[7][12];
myfile>>array[7][1];
while (timber_class==14)
{
ifstream myfile;
myfile.open("TextFile1.txt");
string array[7][12];
myfile>>array[7][12];
int a=0;
int b=0;
cout<<"Timber class selected:"<<array[0][0]<<endl;
cout<<"bending strength:"<<array[1][0]<<endl;
cout<<"tension parallel:"<<array[2][0]<<endl;
cout<<"tension perpendicular:"<<array[3][0]<<endl;
cout<<"compression parallel:"<<array[4][0]<<endl;
cout<<"compression perpendicular:"<<array[5][0]<<endl;
cout<<"shear:"<<array[6][0]<<endl;
break;
}
if (timber_class!=14)
{
cout<<"ERROR"<<endl;
}
}
|