M
Marcelo
Hello,
I would like to know how to use the std::vector variable.
I have tried a class something like this, but I get an error and I don't know why...
the error
lib/image.h:13: error: using-declaration for non-member at class scope
lib/image.h:13: error: expected ‘;’ before ‘<’ token
the code
#ifndef IMAGE_H
#define IMAGE_H
#include <stdio.h>
/*Create the class for the images */
class Image {
public:
int w; // The width of the image.
int h; // The height of the image.
int dim; // The dimension of the the image.
//The array RGB type uchar of the image.
std::vector<unsigned char> arr;
};
#endif /* IMAGE_H */
I would like to know how to use the std::vector variable.
I have tried a class something like this, but I get an error and I don't know why...
the error
lib/image.h:13: error: using-declaration for non-member at class scope
lib/image.h:13: error: expected ‘;’ before ‘<’ token
the code
#ifndef IMAGE_H
#define IMAGE_H
#include <stdio.h>
/*Create the class for the images */
class Image {
public:
int w; // The width of the image.
int h; // The height of the image.
int dim; // The dimension of the the image.
//The array RGB type uchar of the image.
std::vector<unsigned char> arr;
};
#endif /* IMAGE_H */