Q:

how to read multiple binary files in C++ program without the use of boost library

I have variable numbers of binary files (over 100). Each file is huge but has exactly the same numbers of float (e.g., 1E8). Some function/operation will be applied to the float numbers with the same subscript among files, for example, the 10th number in each file. 
Since the total size of files are large, so it is inefficient to firstly read all files into the memory and then do the operation. Instead, I want to do this in a on-line manner. 
vector<string> file (nfiles, file_prefix);
vector<shared_ptr<ifstream> > in;
for(int g = 0; g < nfile; ++g){
  ostringstream fid;
  fid << file_id[g];
  file[g] = file[g] + fid.str() + string(".bin");

  in.push_back(make_shared<ifstream> (file[g].c_str())); //how to specify ios::binary??
}

vector<float> s(nfiles);
for(int i = 0; i < nlines; ++i){
  for(int g = 0; g < nfiles; ++g){
    in[g].read((char*) s[g], sizeof(float));
  }
  // do something with s
}

The code above doesn't work since I don't know how to specify ios::binary when creating the stream for each file. It is used to show what I want. Also, it depends on boost library which is not allowed to be used in my project. I want to learn a solution without the use of boost.
Edit: according to comments in this thread, I learnt that boost is not actually required even if I use make_shared. I still don't understand why I got an error no matching function for call to 'make_shared' in the line in.push_back(...)
Edit: The compiling error is due to a typo in my code. So all my questions in this thread are resolved. 

A:

Since your platform is osx, and std::make_shared ships with c++11, give it a try by adding --std=c++11 to clang++ params.

