I declared a variable value = "0.0001 EOS";
, inside my action I want to transfer those asset to a account .I am having difficulty to typacasting this string into the eosio::asset value .
my code goes like this :
...
std::string value = "0.0001 EOS";
eosio::asset tosend = (eosio::asset)value;
...
it gives me error
error: no matching conversion for C-style cast from 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') to
'eosio::asset'
eosio::asset tosend = (eosio::asset)value;
if I pass the tosend value from cleos command it would work fine . so my question is can I typcast the string value into eosio::token ?