On 4 Dec 2004 09:50:46 -0800, j. smith wrote:
Does line 209 look anything like
int GetProperty() const { return m_property; // note lack of trailing }
Curse my choice of non-programmer friendly font in my newsreader! I
read your original post as having the compiler complain about a missing
close brace, not a missing close parenthesis.
207: virtual bool ToBool() const = 0; // like XPATH function boolean()
208:
209: virtual void Empty() { m_bIsEmpty = true; }
210: virtual void Parse(const TCHAR* szValue) = 0;
211: virtual CSchemaType& Assign(const CSchemaType& rOther) = 0;
212:
213: bool IsEmpty() const { return m_bIsEmpty; }
Everything there looks fine to me.
These lines are part of generated code from Altova XMLSpy.
When I use G++ as compiler no errors occur. In this case it's Borland C++ Builder 6.
Now that is strange. A missing bracket of any kind will always be a
syntax error. If g++ handles it okay, then the code must be valid. So,
it points to some environmental difference (such as include files).
Do both compilers use the same include files (by which I mean when you
say #include <string> do both of them find <string> in the same place)?
If so, you may be able to convince the compilers to give you a list of
include files as they are used (I know MSVC++ has this option, I assume
other compilers will too) and compare the outputs for hints.
Otherwise, I guess you may be stuck with commenting out parts of the
code until the error goes away, and using that as a hint that will
hopefully point towards where the actual problem is.
--
Greg Schmidt
gr***@trawna.com
Trawna Publications
http://www.trawna.com/