5
Ben sınıfın sınıfını yazıyorum. Ama projemi oluşturmak için mac osx kullanırken bazı sorunla karşılaşıyorum. h dosyası bunu beğendi ZAMAN:C++ <class T> şablonunu kullanırken hata: .. bir sınıf değil
template<class Queue_entry>
class MyQueue {
public:
MyQueue();
bool empty() const;
// add entry in the tail of the queue
Error_code append(Queue_entry &x);
// throw the entry of the front
Error_code serve();
// get the front entry of the queue
Error_code retrieve(Queue_entry &x) const;
protected:
Queue_entry entry[MAXQUEUE];
int count;
int front, rear;
};
O cpp file.Error hatası görünür: Ben
şablonu değiştirmek zaman wrong.But nasıl olur bilmiyorumMyQueue.cpp:17:1: 'MyQueue' is not a class, namespace, or enumeration
Başarılı bir şekilde çalıştırılabilir. Benim sınıf arkadaşı sorarken
'class'mate haha Çözüm için teşekkürler, bu sorunun yanıtlandığı gibi işaretleyebilirsiniz :) –