throws different exceptions

J

JohnC

Hello people...

Just for clarification, I'm a C++ newbie, and not really into
programming in C++. I was trying to get
an open source C++ program to compile (the author didn't respond yet)
and get the following problem:

In 'string.h' (included with the program):

line 47:
extern char *strcasestr(const char *haystack, const char *needle);

In 'string.cpp' (again, included)

line 30:
char *strcasestr(const char *haystack, const char *needle);

line 224:
char *strcasestr(const char *haystack, const char *needle)
{..code of the function... No exception is defined...}

Compiling this gives:

Compiling module string.o
string.cpp:30: error: declaration of ‘char* strcasestr(const char*,
const char*)’ throws different exceptions
../include/string.h:47: error: from previous declaration ‘char*
strcasestr(const char*, const char*) throw ()’
string.cpp: In function ‘char* strcasestr(const char*, const char*)’:
string.cpp:224: error: declaration of ‘char* strcasestr(const char*,
const char*)’ throws different exceptions
string.cpp:30: error: from previous declaration ‘char*
strcasestr(const char*, const char*) throw ()’


I'm guessing this is a compatibility problem with another definition
of strcasestr (probably in the C libraries), but I'm not sure... But
why isn't this signaled? The errors blame only internal declaration
conflicts...

Thanks for any suggestion!
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top