For some reason I'm not able to define the second function --> node* previous(void); in the .cpp file It only works for me when i define it In-Line.
I tried it as :
--- The .cpp ---
node* TheMain:revious(void){
node *pn;
return pn;
}
Errors:
- error C2143: syntax error : missing ';' before '*'
- error C2501: 'node' : missing storage-class or type specifiers
- error C2501: 'previous' : missing storage-class or type specifiers
- error C2556: 'int *__thiscall TheMain:revious(void)' : overloaded function differs only by return type from 'struct TheMain::node *__thiscall TheMain:revious(void)'
--------------
---The .h---
class TheMain{
private:
struct node{
FileM *flm;
int counter;
node *next;
};
node *top, *current, *prev;
int number_nd;
////////STRUCT NODE PRIVATE FUNCTIONS//
void gostart(void);
node* previous(void); // CANT DEFINE THIS IN THE .CPP file
public:
//Stuff
};