Questions tagged [string]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
219 views

no member named 'print' in 'std::__1::basic_string<char>'

if I declare a string and attempt to print it like this: std::string s; eosio::print(s); the EOS compiler pukes: In file included from t.cpp:1: In file included from ./t.hpp:4: In file included ...
0
votes
1answer
113 views

Can we typecast string to use it as a id in table?

I need to use a string as a id of table in my smart contract. Initially i found some answers that string can't be use as primary key. But i use string as a key in table as given below: //@abi table ...
1
vote
3answers
206 views

Cannot read string data from table row. But when I put “” data, it works

//@abi action void testhand() { gamecurrents gamecurrenttable(_self, _self); auto existing = gamecurrenttable.find( _self ); if(existing == gamecurrenttable.end()) { ...
3
votes
1answer
342 views

How do I create a Multi-Index DB secondary index from a String?

I'm developing a Smart Contract for EOSIO. I have a Multi-Index table with a uint64_t primary key. I'd like to add a secondary index to the table. Ideally the data I'd be indexing on would be a std::...
2
votes
1answer
88 views

Stored vector of strings in table implicitly converting to vector of unsigned char, why?

I'm trying to store an object in a multi-index table with one of the members a vector of std::string. When retrieving the data however it comes back as a vector of unsigned char, and I can't do ...
1
vote
0answers
50 views

Why can eosiocpp not do normal operations on std::vector<std::string>?

I have two types: struct typeA { std::vector<std::string> vec; } struct typeB { std::vector<std::string> vec; } but I can't seem to get the 2 vecs to mix as eosiocpp seems to be ...
3
votes
1answer
136 views

how to implement a 48-char-long symbol token with balances like “10.0000 custom.name.of.the.token”?

I need to create my.token smart contract on EOS that will be exactly the same as eosio.token contract but my.token's symbol_code will allow a much bigger string. Something like 50 character long ...
1
vote
1answer
57 views

variables which type is account_name is shown as integer since Dawn4.1, while it is string in Dawn4.0

Also if my action have an account_name param, it will ask for an integer too. Is it right? The following is what I post in telegram channel. Hi guys, my table's account field is shown/passed as an ...