^ depends. On a number of things, most of all the toolkit being used.If it's Qt, use Qt designer, it comes with the Qt package.
kk, I'm still quite confused over how I'm meant to use arrays. I could easily do this with if statements, but when I try put arrays into the equation.. I just can't work it out!I have no idea what i'm meant to be making into an array. The possible wins? Each squares possibility? Or just the outcome of the board?
[p] [c] [b] [t] [a] [s] [p]
Quote from: Pyromanik;1335414^ depends. On a number of things, most of all the toolkit being used.If it's Qt, use Qt designer, it comes with the Qt package.Glade for GTK apparently.
I got bored, and also suffer from insomnia ;-) So I made a sample solution. two reasons for not giving code 1) I don't want to give the answers away 2) The code is terriblly hacky, everything is static, the code is pretty much the quickest solution I made to work
Quote from: Pyromanik;1335451Quote from: Pyromanik;1335414^ depends. On a number of things, most of all the toolkit being used.If it's Qt, use Qt designer, it comes with the Qt package.Glade for GTK apparently.Cheers for that, it does sound like gtk. I will have a look today.
Array's should only hold a number of "items" in one dimension.
Being restricted to 1-D arrays isn't that bad.
Yeah in C# you can do int[,], or an array of arrays.imo either way is fine, just whatever suits your style.
Well some languages just don't give you the syntax to make multi-dimensional arrays.It's impossible to 'restrict' someone from making multi-d arrays because you can just implement them yourself by creating list of lists.So when I say restricted to 1D array I really mean syntaxicly restricted.
Top Geary - 27th May 2016 at 12:10 AMI've learnt to ignore when you say derogatory things to me
string cubbyholdbox[1000]for int i = 0; i < 1000; ++i do cubbyholdbox[i] = new string()end
It wouldnt be fun typing out.string cubbyholebox1 all the way tostring cubbyholebox1000 now would it.
string cubbyholdbox[500]for int i = 0; i < 500; ++i do cubbyholdbox[i] = new string()end
i had kinda hope speakman had died, what a pity
for every instance of i between 0 and 500, create array segment (or whatever its termed) for that value of i, then add 1 to i and repeat
int loop_size = 500int current = 0while current < loop_size do cubbyholdbox[current] = new string() current = current + 1end
int i;char[20] myArray;for(i = 0; i < 20; i = (i + 2)) { myArray[i] = 'a';}
[a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ] [a] [ ]