index.cpp というファイルに次のメソッドがあります。コンパイルすると、「indexStructure」がこのスコープで定義されていないことがわかります。
#include "index.h"
#include <cctype> // provides isalpha() and tolower()
#include <iostream>
#include <sstream>
using namespace std;
void index::shiftRight (int i)
{
if ( indexSize == (sizeof(indexStructure) / sizeof(indexStructre[0])))
doubleIndex();
for (int j = indexSize; j > i; j--)
indexStructure [j] = indexStructure [j-1];
}
index.hに、私は持っています
class index
{
struct node {
string item;
int counter;
int* pageNumber;
};
...
private:
node* indexStructure;
int lineCounter;
int indexSize;
};
型ノードの配列を作成し、それを使用して本の単語を検索するつもりです。なぜ未定義なのですか?
前もって感謝します