das headerfile:
#ifndef _GtGuiHardwareModell_h_
#define _GtGuiHardwareModell_h_
#include TcsPtcDetectorStruct
#include <map>
using namespace std;
class GtGuiHardwareModell
{
public:
GtGuiHardwareModell();
~GtGuiHardwareModell();
private:
unsigned short getFrequency();
std::map <unsigned short, unsigned short> getPtcDetectorMap();
std::map <unsigned short, unsigned short> ptcDetectorMap_;
unsigned short frequency_;
};
#endif
Alles anzeigen
source file:
#include "GtGuiHardwareModell.h"
GtGuiHardwareModell::GtGuiHardwareModell()
{
frequency_=1;
}
GtGuiHardwareModell::~GtGuiHardwareModell()
{
}
unsigned short GtGuiHardwareModell::getFrequency()
{
return frequency_;
}
std::map<unsigned short, unsigned short> GtGuiHardwareModell::getPtcDetectorMap()
{
ptcDetectorMap_[1] = 3;
return ptcDetectorMap_;
}
Alles anzeigen
falls ich bei den includes ein struct include, das ich erstellt habe, scheitert das ganze.
#ifndef _TcsPtcDetectorStruct_h_
#define _TcsPtcDetectorStruct_h_
struct TcsPtcDetectorStruct
{
unsigned short partition;
bool enabled;
// std::string widgetId;
std::string caption;
// bool ptcEnabled;
};
#endif
Alles anzeigen
#include TcsPtcDetectorStruct verursacht einen fehler!
In file included from GtGuiHardwareModel.h:11,
from GtGuiHardwareModel.cc:8:
TcsPtcDetectorStruct.h:17: syntax
error before `;' token
In file included from /usr/include/c++/3.2.3/bits/stl_algobase.h:75,
from /usr/include/c++/3.2.3/bits/stl_tree.h:86,
from /usr/include/c++/3.2.3/map:66,
from GtGuiHardwareModel.h:12,
from GtGuiHardwareModel.cc:8:
/usr/include/c++/3.2.3/bits/stl_iterator.h:647: syntax error before `&' token
/usr/include/c++/3.2.3/bits/stl_iterator.h:649: `bool
__gnu_cxx::operator==(...)' must have an argument of class or enumerated
type
/usr/include/c++/3.2.3/bits/stl_iterator.h:649: `bool
__gnu_cxx::operator==(...)' must take exactly two arguments
/usr/include/c++/3.2.3/bits/stl_iterator.h:653: syntax error before `&' token
/usr/include/c++/3.2.3/bits/stl_iterator.h:655: `bool
__gnu_cxx::operator==(...)' must have an argument of class or enumerated
type
/usr/include/c++/3.2.3/bits/stl_iterator.h:655: `bool
__gnu_cxx::operator==(...)' must take exactly two arguments
/usr/include/c++/3.2.3/bits/stl_iterator.h:659: syntax error before `&' token
/usr/include/c++/3.2.3/bits/stl_iterator.h:661: `bool
__gnu_cxx::operator!=(...)' must have an argument of class or enumerated
type
/usr/include/c++/3.2.3/bits/stl_iterator.h:661: `bool
...
..
.
woran scheitert es!?!!?!?
bitte um hilfeee!
lg,
KITT