Hi
why this undefined symbol error?
myList.h
class Ausfaelle {
public:
int index, active, color, height;
float drValue;
std::string label;
Ausfaelle(int index, int active, int color, float drValue, int height, std::string label);
};
extern bool compare (const Ausfaelle &ausfaelle1, const Ausfaelle &ausfaelle2);
second cpp:
Ausfaelle::Ausfaelle(int a, int b, int c, float d, int e, std::string f) {
index = a;
active = b;
color = c;
drValue = d;
height = e;
label = f;
}
bool compare (Ausfaelle &ausfaelle1, Ausfaelle &ausfaelle2)
{
return ( ausfaelle1.color < ausfaelle2.color );
}
main.cpp:
#include "myList.h"
Ausfalllinie[30].sort(compare);
Many thanks