Hi everybody, i want to compare between 2 vector that stored char value.
I've made 2 vector:
vector <char*> className;
vector <vector<char*> > Item;
first i stored the class data in each vector, the name of class in vector className. after that i get data from the other file that contain many values in Item. Item is 2D vector, it stored raw and column. the last column contain the value of class which i had stored in className
So i want to compare the value of the last column of each Item with the value of className, so i made this code:
vector <int> ClassFreq;
int p = numberOfAttribute+1; //this refer to the last column
int itemSize = (int)Item.size();
for(int i = 0; i < itemSize; i++)
{
int nitemSize = (int)Item[i].size();
for(int j=0; j < numberOfClass; j++)
{
[B]if(strcmp(Item[i][p], namaKelas[j]))[/B]
{
ClassFreq[j]++; //count the frequency of each class and store it in this vector
printf("stress!");
}
}
}
but it gave me an error message :
18 [main] c45 3296 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
71292 [main] c45 3296 open_stackdumpfile: Dumping stack trace to c45.exe.stackdump
i really need help here, thank you so much...