i'm trying to call a function in another .h file named display that receives a pointer for a std::vector<vector<double> >
but when i try to call it i get the error that variable was not declared in this scope. Here's a sample of the code, i hope you can help.
//proper includes above
#include <vector>
#include "display.h"
#include "extract_balls.h"
int main(void)
{
std::vector<vector<double> > balls_centroids;
std::vector<vector<double> > balls_centroids_computed;
balls_centroids = extract_balls();
for (vector< vector<double> >::size_type u = 0; u < balls_centroids.size(); u++) {
vector<double> x = balls_centroids.at(u);
x[0] = farest_point[0]-x[0];
x[1] = farest_point[1]-x[1];
x[2] = farest_point[2]-x[2];
balls_centroids_computed.push_back(x);
}
display(&balls_centroid_computed);
}
The display.h file is something like this:
#include <vector>
void display(std::vector<std::vector<double> >& coord){
//do stuff
}