I am currently trying to access the vector defined as such:
#include <iostream>
#include <cstdlib>
#include <vector>
#include <string>
using namespace std;
template<class T>
class file
{
public:
typedef vector<vector<T> > buffer;
};
int main()
{
file<double> test;
cout << test.buffer.size() << endl;
std::vector<pair<string, file<double> > > list_of_files;
for (const auto& [name, file] : list_of_files)
{
cout << file.buffer.size() << endl;
}
}
the error message I am getting is that scoping the buffer
like I am currently doing is invalid?, but why is it invalid? I don't see a reason why it should be?
I am in the for loop trying to iterate between the inner and outer vector of the buffer
, but since I can't scope it, I am not able to access? How do i access it?