#include "global.h" #include "Functlib.h" using namespace std; int main(int argc,char** argv){ double j1 = 1.5; double j2 = 3.5; vector > content; vector row; string line, word; vector j1data; vector j2data; vector Rk20data; vector Rk21data; vector Rk22data; vector Rk40data; vector Rk41data; vector Rk42data; fstream file("RkTable.csv"); if(file.is_open()){ while(getline(file,line)){ row.clear(); stringstream str(line); while(getline(str, word, ',')) row.push_back(word); content.push_back(row); j1data.push_back(row[0]); j2data.push_back(row[1]); Rk20data.push_back(row[2]); Rk21data.push_back(row[3]); Rk22data.push_back(row[4]); Rk40data.push_back(row[5]); Rk41data.push_back(row[6]); Rk42data.push_back(row[7]); } cout<< " --- Angular Data File Loaded --- \n"; }else cout<< "Could not open the file\n"; vector::iterator dit; vector::iterator dit2; vector j1datad = string_to_double_vector(j1data); vector j2datad = string_to_double_vector(j2data); vector rk20datad = string_to_double_vector(Rk20data); vector rk21datad = string_to_double_vector(Rk21data); vector rk22datad = string_to_double_vector(Rk22data); vector rk40datad = string_to_double_vector(Rk40data); vector rk41datad = string_to_double_vector(Rk41data); vector rk42datad = string_to_double_vector(Rk42data); int nn = 0; for(dit = j1datad.begin();dit < j1datad.end();dit++){ if(j1 == *dit){ for(dit2 = j2datad.begin();dit2 < j2datad.end();dit2++){ if(j2 == *dit2 and j1 == j1datad[distance(j2datad.begin(),dit2)]){ // cout << *dit << " " << *dit2 << " Index Equals = " <