I created a table with 5 rows/records. While just playing with the code, II tried to print the whole table content with with the following code:
require_auth(_self);
accounts_table accounts(_self, _self.value);
for(auto itr = accounts.begin(); itr != accounts.end();++itr) {
print( itr->parent_account);
print("\n");
}
But only got one row.
When iI call the command cleos -u get table ACCOUNT SCOPE TABLENAMEcleos -u get table ACCOUNT SCOPE TABLENAME
, it shows all the 5 records.
Why does the code above only prints the first record?