so I got two questions with this code, first lets work on the efficacy..making it work, then may be a more efficient implementation can be suggested...

there is a header _row.h
# pragma once
struct _row
   int c1;
   int c2;
   int c3;
and a class build wheel
class MakeWheel
private : std::string text ;
public :
    MakeWheel (std::string textfile );
    std::vector<_row> buildWheel();

buildWheel is fed with a text file which contains 3 separated two digits integer on every line...
the aim is to load every line into a struct object them in a vector which can be used else where in the bigger application...

code of buildWheel()
MakeWheel :: MakeWheel (std::string textfile)
{text = textfile;}

std::vector<_row> MakeWheel :: buildWheel ()
     std::string temp, stemp;
     std::vector<_row> hold;

     std::ifstream f(text) ;
     while ( !f.eof() )
      _row *rowpt = new _row ;
      std::getline(f, temp);

      stemp = temp.substr(0, 2);
      rowpt->c1 = std::stoi(stemp, nullptr, 0);

      stemp = temp.substr(3,2);
      rowpt->c2 = std::stoi(stemp, nullptr, 0);

      stemp = temp.substr(6,2);
      rowpt->c3 = std::stoi(stemp, nullptr, 0);

      delete rowpt;

   f.close ();
  else std::cout<<"could not open file to take in raw values for filtering"<<std::endl;

 return hold ;

Ok so everything compiles fine..
but when I run the code I get an out of range error, running it through the debugger I noticed that the problem was in the while brace and to be precise with the eof..after the last line ..getline continues to read the empty space after the last line which I think is loaded into temp and of course being an empty string I get an error with string.substr ...
or at least this is what I understood with the debugger...
so the first solution will be to try to make getline not read in an empty string or better still eof flag should really go up after the last line of digits has been read...which for a strange reason is not happening...

thanks to all who pass by...