Re: c++ question: no matching function call



i know its off topic, sorry, i had nowhere else to turn though. :)
that didnt work using const char, it says the same thing :{

thanks.
jeff


On 08 Aug 2002 21:08:05 +0200
Joaquín Cuenca Abela <cuenca pacaterie u-psud fr> wrote:

That's offtopic, but your "somefunction" should take a "const char *"
argument instead of "char *"

Cheers,

On Thu, 2002-08-08 at 14:00, jeff wrote:
hi all, i have something like this

abc.h:
class abc {
public:
    abc (GtkWidget *mywidget);
    // destructor etc
    somefunction (char *something);
}

abc.cc
#include "abc.h"
// constructor destructor etc etc
abc::somefunction (char *something)
{
//stuff
}

main.cc
#include "abc.h"
//... then in a function or somethin
abc *mystuff = new abc;
mystuff->somefunction("sometext");
delete mystuff;

and i get:

main.cc:73: no matching function for call to `abc::somefunction (char *&)'

note the function names and what not have been changed to protect the innocent...err just typed this up 
from my head just to show the relevant parts...

thx
-j
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Joaquín Cuenca Abela
cuenca pacaterie u-psud fr

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]