the code I'm using is:
the only thing that has to do with this code in the main cpp file is the calling of method vecCode://vect.h //does vector math #include <iostream> #include <string> #include <cmath> #include <cstdlib> #include <cstring> #include <vector> #include <sstream> using namespace std; using std::string; class vect { public: vector <float> vector1; vector <float> vector2; string vectorsWhole[2]; vector <string> inread; bool last; int choice; int vectIndex[2]; char func; float scalar; vector <float> vectorEQ; bool notLastElement(string num){ if(num.substr(num.length()-2,num.length()-1)=="l"){ return false; }else{ return true; }//end if }//end last element void vec(){ int i=0; cout<<"Enter vector 1, hit enter after each element, and end your last element with \"L\":\n"; do{ cin>>inread[i]; i++; }while(notLastElement(inread[i])); for(i=0;i<vector1.size();i++){ cout<<inread[i]<<"\n"; }//end for }//end vec };//end class
as I said in the title, as soon as vec is called, there's about a 5 second delay where you can enter data and then it "exits due to signal 10 (sigbus)"
any help



LinkBack URL
About LinkBacks


