Re: c++ question: no matching function call



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




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