おはようございます、ありがとうございます!Eclipse C++:クラス、名前空間、列挙が見つかりません
私はmacOS X 10.12で作業しています。 Eclipse Neon 4.6、macOS X GCCを使用したコンパイル以下のmatrix.h
ファイルに
../matrix.h:82:1: error: 'Matx' is not a class, namespace, or enumeration
`Matx::~matx(){`
`^`
`../matrix.h:27:7: note: 'Matx' declared here`
エラーが紛らわしいです:私は、次のエラーが発生します
#ifndef MATRIX_H_
#define MATRIX_H_
#include <iostream>
template <class T>
class Matx {
int ROWS, COLS ;
int colix[COLS], rowix[ROWS] ;
T ** array ;
Matx(int, int) ;
~Matx() ;
void rowSwap() ;
void size(void) ;
void swapRows(int i1, int i2) { std::swap(this->array[i1], this->array[i2]); }
void printMat(void) ;
};// end class matrix
template <class T>
Matx::~Matx(){
delete this->array ;
}// end ~matx()
注意がファイル内のいくつかのより多くの機能がありますが、エラーはすべて全体で一貫していますそのうちの。私はスコープの解像度となしで、すなわちの機能を定義しようとしましたが、役に立たないです。どんな助けでも大歓迎です!
ありがとう!クラスを指定した後に ...忘れてしまった。 –