Re: error: parse error before `;' token ???
Re: error: parse error before `;' token ???
- Subject: Re: error: parse error before `;' token ???
- From: Kevin Grant <email@hidden>
- Date: Tue, 20 Jan 2004 19:01:30 -0600
Doh! I didn't check for min and sure enough it was defined as a
macro. ;( It's also being included in the precompiled header for the
project. :( For now I just did a #include <string> before the other
header in our prefix file and it now gets past the parse errors. Any
better suggestions for working around this?
Macros can be pretty complex, but in C++ most simple ones can be
rewritten as inline functions or constant expressions.
e.g. use "const int x = 3;" instead of "#define x 3", or "inline void
f(int a, int b) { . . . }" instead of "#define f(a,b) ...", etc. Once
you do this, you avoid all kinds of problems.
$0.02
Kevin G.
http://homepage.mac.com/kmg/
mail to kevin at ieee dot org
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.