Skip to content

Instantly share code, notes, and snippets.

Created May 2, 2016

What would you like to do?
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
contract testStruct {
struct stru{
string[] s;
stru myStru;
function add(string s) {
string[] strAr; // Uninitialized storage pointer. Did you mean ' memory strAr'?
myStru = stru(strAr);
function add(string s) {
string[] memory strAr; // just doesnt do anything, exception?
strAr[0] = s;
myStru = stru(strAr);
function getFirst(uint i) constant returns (string s) {
s = myStru.s[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.