Original Post
Here is my Source Code. When I compile Compiler is firing Linker error.
class HtmlTagAutoCompleter{
private:
static stack<string> tstk;
public:
static bool detectStatus(const string& tagName);
};
bool HtmlTagAutoCompleter::detectStatus(const string& tagName){
if(tstk.empty() || tstk.top() != tagName){
tstk.push(tagName);
return TAG_OPENED;
}else{
tstk.pop();
return TAG_CLOSED;
}
}
../cgi++/.libs/libcgixx.so: undefined reference to `HtmlTagAutoCompleter::tstk'
collect2: ld returned 1 exit status
Whats wrong here ??