Topic: extern c and static members
Author: scott.gregory@cibc.ca
Date: 2000/11/29 Raw View
Hello;
Pre-std c++, I used to have things like this
class Foo {
...
static int compare(const void*, const void*);
...
};
So that I could pass them to qsort.
Now my compiler warns me that qsort should take an extern "C"
int(*)(const void *, const void*) which I would tend to agree with.
So - should I be able to
class Foo {
...
static "C" int compare(...)
...
};
And while I know I should not use qsort :-) should something like this
work?
Thanks
sdg
Sent via Deja.com http://www.deja.com/
Before you buy.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
[ Note that the FAQ URL has changed! Please update your bookmarks. ]