cURL / Mailing Lists / curl-library / Single Mail

curl-library

Compilator error with WRITEDATA

From: Jacek Jablonski <yacek87_at_gmail.com>
Date: Sun, 22 Jan 2006 11:07:30 +0000

Hello!
I am currently writing program that uses WriteFunction and WriteData
options. It is written in C++. For WriteData and WriteFunction I have used
the same structure and function as in:
http://curl.haxx.se/lxr/source/docs/examples/getinmemory.c
But I have problems with casting, compilator says:
mod2.cpp: In constructor `SMS::SMS()':
********
mod2.cpp:60: error: invalid conversion from `void*' to `FILE*'
mod2.cpp:60: error: initializing argument 1 of `
   cURLpp::OptionTrait<OptionType, option>::OptionTrait(typename
   cURLpp::Option<OptionType>::ParamType) [with OptionType = FILE*,
CURLoption
   option = CURLOPT_FILE]'
********

And line 60 in my file is:
handle.setOpt(cURLpp::Options::WriteData((void*)&chunk)); (as i the example
file)

What is wrong, please help me.
Greetings,
Jacek Jablonski
Received on 2006-01-22