I created a class called Text, and one of its members is a std::vector of Pal_freq, a struct declared inside the class.
I am getting those errors:
error: ‘Pal_freq’ does not name a type bool criteri (const Pal_freq& p1, const Pal_freq& p2);
error: ‘Pal_freq’ does not name a type bool criteri (const Pal_freq& p1, const Pal_freq& p2);
error: ‘Pal_freq’ was not declared in this scope vector consultar_taula_freq();
error: template argument 1 is invalid vector consultar_taula_freq();
Here is the code:
class Text {
public:
struct Pal_freq {
int freq;
string pal;
};
vector <Pal_freq> taula;
};
#include <string>or#include <vector>?Text::Pal_freqwhen you use it outside ofText.