E
Ernesto
Hi everybody:
I have implemented a Pointer class template that uses reference
counting to deallocate memory automatically.
I have the following code using my Pointer:
char* auxchar = new char[100];
strcpy(auxchar, "Hola mundo");
Pointer<char> charPointer = Pointer<char>(auxchar);
....
Is possible to implement an operator overloading or some stuff to do
something like this:
printf("Message: %s\n", charPointer);
that should return a <T*> to avoid create a method like
charPointer.getData() ?
Thanks in advance
Ernesto
I have implemented a Pointer class template that uses reference
counting to deallocate memory automatically.
I have the following code using my Pointer:
char* auxchar = new char[100];
strcpy(auxchar, "Hola mundo");
Pointer<char> charPointer = Pointer<char>(auxchar);
....
Is possible to implement an operator overloading or some stuff to do
something like this:
printf("Message: %s\n", charPointer);
that should return a <T*> to avoid create a method like
charPointer.getData() ?
Thanks in advance
Ernesto