frenchie_nic
Member
- Joined
- May 3, 2006
- Messages
- 7
- Programming Experience
- Beginner
Hi all,
I am new to programming and to this site but i am giving it a go (well I did study a bit of Pascal in the past but didn’t make to much of it and it was a few years ago). I am trying to self teach myself the .net but I am having a problem and would like to understand the reason.
As a project I am trying to make a game that needs to generate a list of numbers then put it in an array if the number as not been chosen before. Then the next number is generated and checked against the existing array to see if the number as already been chosen (then if not then it is added to the existing array, etc.. u get the picture
). I have done most of it but I am coming up to a problem: when ever I try to check the number against the array, although when compiling I am seeing the value of the array as it should be (i.e. "1" "12" "9" etc, ), when I do my "InStr" all I ever manage to do is compare one digit at the time even when double digit (i.e. if I have a number of 6, it will tell me its already in my string if I have 16 as it will check it against the 1 first and the 6 after but not against the value of 16.) I have tried other way but can’t get my head around so if someone could give me the right direction I would appreciate. I am not giving my code because I don’t want an answer in code but more a direction of what to look for.
Thanks J
Nic
Ps. I hope I made some sense in my question
I am new to programming and to this site but i am giving it a go (well I did study a bit of Pascal in the past but didn’t make to much of it and it was a few years ago). I am trying to self teach myself the .net but I am having a problem and would like to understand the reason.
As a project I am trying to make a game that needs to generate a list of numbers then put it in an array if the number as not been chosen before. Then the next number is generated and checked against the existing array to see if the number as already been chosen (then if not then it is added to the existing array, etc.. u get the picture
Thanks J
Nic
Ps. I hope I made some sense in my question