Hi,
I have a class linestorage which has a static member S (represents lines of words of characters).
The problem is I don't know how to access this member in a function. I am getting this error message
Info :Linking C:\DOCUMENTS AND SETTINGS\DELL.DFHWHLB1\MY DOCUMENTS\SPRING 09\CSCI 250\HW\HW1\HW1_P2\kwic.exe
Error: Error: Unresolved external 'LineStorage::S' referenced from C:\DOCUMENTS AND SETTINGS\DELL.DFHWHLB1\MY DOCUMENTS\SPRING 09\CSCI 250\HW\HW1\HW1_P2\LINESTORAGE.OBJ
could you please help me to solve it.
//---------------- linestorage.h ----------------
#ifndef linestorage_H_
#define linestorage_H_
#include <vector.h>
using namespace std;
class LineStorage
{
private:
static vector <vector <vector<char> > > S;
public:
void setchar(int,int,int,char);
};
#endif
//---------------- linestorage.cpp ----------------
#include <iostream.h>
#include <conio.h>
#include "LineStorage.h"
void LineStorage::setchar(int l,int w,int c,char d)
{
vector <char>::iterator it=LineStorage:: S[l][w].begin();
LineStorage:: S[l][w].insert((it+c-1),d);
}