You don't want to read a file every time you want to display something, that could be incredibly slow (assuming the file was of any reasonable size). You want to read the file once into memory, and draw the map from that.
Build a two dimensional array. Fill that in a load_map() function with the whole file, then draw the tiles out of that at a given offsets every time you update the screen.
EDIT: in response to comments—
Well, this isn't an SDL issue, it's just a C++ issue. I'm answering this on my phone, so I can't really write an elaborate answer, but if it were me I'd use a single-dimensional std::vector or alternatively (less efficiently) a two dimensional std::vector< std::vector< int > > where the value in the array(s) is an int that correspondcorresponds to the index of tile that you want to draw. You'll want to encapsulated that into a 'Map' class.
I I also assume ultimately, you'll want more than two tiles. If you're building a game, you'll need to work out how to do this and understand it well, because this is only the very beginning of what you'll encounter.
The good thing is there are a million tutorials on tile based games in C++.
As far as other critiques, I wouldn't address the rest, because the performance issue that exists is so fundamental that any other issues palespale in comparison.