Mail Archives: djgpp/1998/10/29/10:01:38
Hi.
I've made a structure with an appropriate constructor in c++ and use the
'new' to allocate a few of them dynamically, like:
void my_func()
{
new my_object(10,20);
new my_object(30,40);
}
I compile using the -Wall switch, so the compiler correctly tells me
that "value computed is not used", but I don't have anything to use it
for, as the constructor will take care off putting the pointer to the
struct in the right list. Believe me, it can be very annoying to get ten
of those warnings every time I recompile the code, so I just wondered if
it is somehow possible to turn off the warning for only a few lines of
code (I don't want to disable it entirely), or to fix the problem in
another way (I suspect I might be doing something wrong by just ignoring
the return value).
--
- Ole Laursen - Aalborghus Gymnasium - 98zOLaw AT aalborghus DOT dk -
Remember, no questions are stupid - some are just easier to answer than
others ;-)
- Raw text -