Re: Access the next item (std::list)
Jack wrote:
Hi Uli,
[snip]
std::list<FINFO>::iterator iter;
What is this FINFO macro?
struct FPOINT
{
double x;
double y;
};
Yeesh! As a general rule, never use ALL_UPPERCASE for anything but macros
and always use it for macros. The reason is that macros behave differently
than other things because they are evaluated by the preprocessor and it is
often worthwhile being able to visually tell those apart.
Suggestion:
namespace f // you'll sure come up with a better name than 'f'
{
struct point { ... };
}
No such fields, I just guess std::list would provide some services like
that. But I couldn't find any...
There isn't any.
The closest I could get was _NodePtr, looks like it's private..
Yes, it's private. Secondly, it is a "reserved name", which you can
determine from the fact that it starts with an underscore followed by a
capital. Anything like that or with two consecutive underscores
is "reserved to the implementation" for use, therefore you also shouldn't
use it. Note that a private reserved thing also means that it might change
without any notice, so the next version of the standard library might not
have it at all or it might mean something different or be a macro that
resolves to 'system("format C:\\")'.
Good luck!
Uli
--
C++ FAQ: http://parashift.com/c++-faq-lite
Sator Laser GmbH
Gesch?ftsf?hrer: Thorsten F?cking, Amtsgericht Hamburg HR B62 932