Re: Writing C++ apps with Gtk?



Hi,

a non static member function of a class has an implicit first argument
"this", which is hidden from you, if you program, but makes it different
form a similar looking toplevel function, i.e. take

class A
{
  int f( int b );
} a;

then

a.f( 5 );

really comes down to something like: (do not take that literally)

A_f( &a, 5 );

otherwise you couldn't access the members of the instance of the class 

So either make that function static, make it a nonmember function, or use
gtk-- (see www.gtk.org for location). There all the problems you have, are
elegantly solved.
-- 
+--------------============####################============--------------+
| Sebastian Wilhelmi, Institute for Computer Design and Fault Tolerance, |
| University of Karlsruhe;  Building 20.20, Room 263,  D-76128 Karlsruhe |
| mail: wilhelmi@ira.uka.de;  fax: +49 721 370455;  fon: +49 721 6084353 |
+-----------------> http://goethe.ira.uka.de/~wilhelmi <-----------------+



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