"Florian Lindner" <Florian.Lindner@xgm.dewrote in message
news:eccm2k$g1k$1@news.in.tum.de...
Quote:
Howard wrote:
>
Quote:
>Or, perhaps you're not including the header file(s) correctly? Perhaps a
>misspelled filename in the #include statement(s)? You haven't shown that
>#include anywhere, or told us the name(s) of the file(s) that those
>#classes
>are defined in, so we can't tell.
>
>
Here are both files complete, without anything cut out:
>
and my compile command:
>
florian@horus ~/Dokumente/Studium/SE/SE9 $ g++ classes.cpp
classes.cpp: In member function `int CDINBauteil::getDINNumber()':
classes.cpp:28: error: `m_iDINNumber' was not declared in this scope
classes.cpp: In member function `void CDINBauteil::setDINNumber(int)':
classes.cpp:33: error: `m_iDINNumber' was not declared in this scope
classes.cpp: In member function `void CDINBauteil::printDINInfo()':
classes.cpp:38: error: `m_iDINNumber' was not declared in this scope
>
The code looks ok to me. Is that the entire list of warnings/errors?
I don't know much about command-line compiling, and I only use gcc via the
XCode IDE, but it may have something to do with the way you're compiling
this, or your environment setup. In any case, the code is fine. At least
for me, in VC++, it compiles fine.
I don't know what that path above specifies, but maybe there's a problem
finding that header. If so, though, I'd think it would complain, unless
it's finding a _different_ classes.h file. Hmmm, perhaps it's simply the
name "classes.h"? Is there a system file with that name? Or another file
named classes.h somewhere that it's finding? (You could try introducing an
obvious syntax error in your classes.h file to see if it's actually
including the one you want.)
If it's a gnu-related problem, then a gnu newsgroup might be the better
place to ask.
-Howard