Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there way ? #6

Open
calmesriram opened this issue Jul 16, 2019 · 0 comments
Open

is there way ? #6

calmesriram opened this issue Jul 16, 2019 · 0 comments

Comments

@calmesriram
Copy link

calmesriram commented Jul 16, 2019

Hi,
I am new to Eos (iam using jungle Testnet ). i have tried a small contract which given below. adding two number
and result storing in a variable c.after deploying the contract. passing a two argument to contract
function.

how do i access the variable c (which is result). if not is there is any other way to access result.

#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
using namespace eosio;
class add : public contract
{
public:
uint64_t c;
using contract::contract;
void sum(uint64_t a, uint64_t b)
{
c = a + b;
print("Sum is ",c);
}

void gdata()
{
print(c);
}
};

EOSIO_DISPATCH(add, (sum) (gdata))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant