Loading and comparing files containing 3D data
For inequality, it is sufficient to have one difference. If one difference is found, it's unnecessary to compare more data. There's no point in counting equal data entries and compare that number to the total number of entries, because a single inequality will reduce that number making it impossible to be the same as the total number of entries.

if(data_train[i] == data_test[i])
            count++;


Should be

if(data_train[i] != data_test[i])
            return 0;