I am currently implementing a sliding window functionality for a vector<double>
. Problem is I cant seem to cout
the values? When I output it i seem to get memeory location, rather than the actual values..
I need to process the data which the window consist of, so having acess to the values would be neat.
typedef double SAMPLE;
std::vector<std::vector<SAMPLES> > loaded_files;
//Some init
std::vector<SAMPLE>::iterator it;
for (it = loaded_file.samples[0].begin() ; (it + (NUM_SECONDS*SAMPLE_RATE)) != loaded_file.samples[0].end(); ++it)
{
auto window = *it;
std::cout << "printing the window!" << std::endl;
std::cout << &(window) << std::endl; // prints out memory location?
}