Re: The void** pointer breaking symmetry?
elmar@xxxxxxxxxx writes:
char *cp;
void *vp;
void **vpp;
// 1
cp=vp;
// 2
cp=*vpp;
Why is the first instruction allowed while the second one creates a
compiler warning/error?
Both are allowed. If the compiler refuses to allow one of them
(possibly with a warning) then you are probably using a C++
compiler.
--
"Your correction is 100% correct and 0% helpful. Well done!"
--Richard Heathfield
.
Relevant Pages
- Re: fields for methods?
... void A::foo{ ... but only by a compiler that is allowed to ... int static_instance i = 0; ... it totally breaks the idea of encapsulation, which is the reason a lot ... (comp.programming) - Re: fields for methods?
... but only by a compiler that is allowed to ... struct A {void foo();}; ... int static_instance i = 0; ... Is not possible because foo is the only member of A... ... (comp.programming) - Re: Calling a matlab dll in java
... I compiled it with mcc to dll shared library ... all compiler and linker options in VS took me a while, ... JNIEXPORT void JNICALL Java_JNITest_JNITest_initializeApplication ... public void launchThread() ... (comp.soft-sys.matlab) - Re: How printf() works???????
... Getting something totally backwards is,of course, a mistake. ... is no evil intent in my correction. ... What he said to you about your compiler is beside the point and did not ... Therefore Robbie Hatley took your statement as correcting a ... (comp.lang.c) - Re: Determining a functions calling address
... >> conversion between pointer to any type of function and pointer to ... >> void, or indeed pointer to any other object type. ... Apparently you are not using a real C++ compiler, ... First you should have received diagnostics along these lines: ... (comp.lang.cpp) |
|