Is there any way to change a pointer type to our user defined type.
For example,
In my code, I have something like this:
=============== =============== ===
int i = 0;
int *p;
int **pp;
=============== =============== ===
I want it to be,
=============== =============== ===
int i = 0;
MyType<int> p;
MyType<MyType<i nt> > pp;
=============== =============== ===
I tried to write a manual parser for this; however, there were so many corner cases coming out.
I think there is no language facility; but is there any way to change the pointer type at compilation or any other level ?
Assume that, I want it do be done in existing code.
For example,
In my code, I have something like this:
=============== =============== ===
int i = 0;
int *p;
int **pp;
=============== =============== ===
I want it to be,
=============== =============== ===
int i = 0;
MyType<int> p;
MyType<MyType<i nt> > pp;
=============== =============== ===
I tried to write a manual parser for this; however, there were so many corner cases coming out.
I think there is no language facility; but is there any way to change the pointer type at compilation or any other level ?
Assume that, I want it do be done in existing code.
Comment