Re: Problem with pointer conversion

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



outfile.write (zero,size);

//End Code\\

Bellow is the error given by the compiler.

//Begin Error\\

Z:\SecureIO.cpp(172) : error C2664: 'write' : cannot convert parameter
1 from 'const int *' to 'const char *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast

as the error indicates, the write method expects a char*.
what is 'zero' in your write call?

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"


.



Relevant Pages

  • Re: atlprint.h errors
    ... Based on aao's reply about wtl version, I upgraded to WTL 7.5 but now ... C-style cast or function-style cast ... Conversion from integral type to pointer type requires ... class-template member function 'long __thiscall ...
    (microsoft.public.vc.language)
  • Re: atlprint.h errors
    ... Compiling 'UTCTimeServerChecker.h'... ... C-style cast or function-style cast ... Conversion from integral type to pointer type requires ...
    (microsoft.public.vc.language)
  • Re: error C2065: ImageList_Read : undeclared identifier
    ... Conversion from integral type to pointer type requires ... C-style cast or function-style cast ... Error executing bscmake.exe. ...
    (microsoft.public.vc.mfc)
  • Problem using windows MCI in a Qt project in Visual Studio
    ... 'LPCWSTR' ... conversion requires ... C-style cast or function-style cast ...
    (microsoft.public.win32.programmer.tapi)
  • Using windows mci in a Qt project in Visual Studio
    ... 'LPCWSTR' ... conversion requires ... C-style cast or function-style cast ...
    (microsoft.public.vc.language)