warning C4238 : cast reference in void*



Hi,

I want to pass a reference of an object as the parameter of a function.
This function takes an void*

void foo(void* param)
{
...
}

int main()
{
CString szWord;

foo((void*) &szWord); //give C4238 warning : nonstandard extension
used : class rvalue used as lvalue
}

How can I solve this warning ?

Regards,
Eric

.



Relevant Pages

  • Re: Applet ( canvas )
    ... int positionX1 = 0; ... @param D The Drawing. ... void collectrectinfo ... Start the Tilemode1 View draw thread. ...
    (comp.lang.java.programmer)
  • APPLET ( CANVAS )
    ... int positionX1 = 0; ... @param D The Drawing. ... void collectrectinfo ... Start the Tilemode1 View draw thread. ...
    (comp.lang.java.programmer)
  • [PATCH] Remove module reference counting.
    ... now have zero reference counts always. ... -unsigned int module_refcount; ... -static inline void __module_get ...
    (Linux-Kernel)
  • Re: back once again...
    ... reference to type ... a, signed char ... int dycObjectP(dyt obj); ... void dycBeginClass; ...
    (comp.lang.misc)
  • Re: Using ref
    ... Method (ref x); ... void Method (ref int y) ... the reference syntax is no more and no less than syntactic sugar. ...
    (microsoft.public.dotnet.languages.csharp)

Loading