Random words from array for Hangman -
oh, okay sooooo need method specify return of struct work?
language meant c#! :)
ok, doing wrong here. i've tried different things return random word array words keep getting errors. syntax appears similar i've read on. thanks.
string getrandomwords() { wordbook[] words = new wordbook[26]; random = new random(); return words[random.next(0, words.length)];
your random syntax missing. should folows:
random random = new random(); return words[random.next(0, words.length)];
also, function specifies returns string, return words[random], struct. hence error
Comments
Post a Comment