Skip to content

Commit

Permalink
Merge pull request #271 from EOSIO/docs/fix-253
Browse files Browse the repository at this point in the history
Fix glossary ABI reference in hello world
  • Loading branch information
lparisc authored Aug 11, 2020
2 parents ca50579 + d1b759a commit 21dcea6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class [[eosio::contract]] hello : public contract {

The above action accepts a parameter called `user`, that's a [`name`](https://developers.eos.io/manuals/eosio.cdt/latest/structeosio_1_1name) type. EOSIO comes with a number of typedefs, one of the most common typedefs you'll encounter is `name`. Using the `eosio::print` library previously included, concatenate a string and print the `user` parameter. Use the braced initialization of `name{user}` to make the `user` parameter printable.

As is, the ABI <<glossary:ABI>> generator in `eosio.cdt` won't know about the `hi()` action without an attribute. Add a C++11 style attribute above the action, this way the abi generator can produce more reliable output:
As is, the [ABI](../../glossary/index/#application-binary-interface) <!-- (hiding for now) <<glossary:ABI>> (unhide after tooltip feature implemented) --> generator in `eosio.cdt` won't know about the `hi()` action without an attribute. Add a C++11 style attribute above the action, this way the abi generator can produce more reliable output:

```cpp
#include <eosio/eosio.hpp>
Expand Down

0 comments on commit 21dcea6

Please sign in to comment.