Re: pointer
Tech-Archive recommends: Fix windows errors by optimizing your registry
On Thu, 07 Jun 2007 15:19:12 GMT, MrAsm <mrasm@xxxxxxx> wrote:
class A is derived from class B
void A::foo1(A ** pPointer )
{
B * b = new B();
b->foo2( pPointer );
}
void B::foo2(B ** pPointer)
{
...
}
Would this compile?
I've checked, and a reinterpret_cast is needed for my solution of
using double pointers.
BTW: do you really need this level of indirection, or would a simple
pointer (not double pointers or reference to pointers) be just fine?
MrAsm
.
Relevant Pages
- Re: Whats the position of pointers
... couldn't have made if you'd bothered to compile your code before ... It's not possible for the value of a to become 20 unless you modify ... problems which cann;t be solved without using the pointers. ... can be a solution without using call by reference here. ... (comp.lang.c) - Re: Idea
... But stand-alone function pointers don't carry as much information ... The const block declares things that are CONSTANT, ... ALL functions reside in the ... that "AT COMPILE TIME", just like constants, functions are put in a specific ... (comp.lang.pascal.delphi.misc) - Re: dynamic types
... CodeDom so any pointers on how to use it is helpful. ... ahead of time using CodeDom and then compile them into the assembly that ... versioning to compare the two type descriptions and then only do the real ... (microsoft.public.dotnet.languages.csharp) - Re: [Bug #11342] Linux 2.6.27-rc3: kernel BUG at mm/vmalloc.c - bisected
... Ingo Molnar wrote: ... Doesnt have ... and the full "allyesconfig" does compile. ... only pointers to cpumask's can be passed to functions and returned from ... (Linux-Kernel) - Re: memmove crash
... Pointers and ints are not the same size on all systems. ... system doesn't compile on yours, then I think I definately want to go back to assembly language. ... I can take an assembly program and recompile it on any other x86 linux system and it will compile and work without a problem, whereas if you take a C program that compiles on one person's x86 linux system, it may or may not compile on another's. ... If a program assembles and works on one x86 linux system, it will assemble and work on another x86 linux system just the same. ... (alt.lang.asm) |
|