I get only the "storage class specified for save_inv" error. I have checked the program many times for any missing semicolons but it compiles fine if i remove the extern keyboard (which is clearly not the purpose)....How do I pass the ofstream objects between main and class member functions to write to the same txt file then?
thanks coder777 for that serious error. i cant send the
ofstream &save_inv
to the function as it hampers my requirements. I tried creating save_inv as a global object but the error still lingers. I know global variables are not a good programming practice, but since I am developing an algorithm solely it should be fine I guess.