create an object with variable CLASS

Andrew Haley aph@redhat.com
Tue Oct 27 12:32:00 GMT 2009


Mohsen Pahlevanzadeh wrote:
> My main file:
> int main(){
> 	module_management *x;
> 	x.printg();
> }

Well, that's not going to work, is it?  x is a pointer, not
an object.  You need

   x = create_object("mikrotik");
   x->printg();

Andrew.



More information about the Gcc-help mailing list