| Bound (3) | |||
|
Hey guys, I'm just trying to get a handle on the uses of pointers here. Though clearly from my errors I'm missing a key concept :-) Here is my code: (You can assume that the array, "array_size" has values in it, I did this part in another function)
Once the program reaches the word[num] = false; some unhandled exceptions pop up. Any clarification you guys can give me on these techniques will be greatly appreciated! edit - My mistake, I simplified my code a bit from my actual program and mixed up the loops, now the code should be in its correct form. | |||
|
Last edited on
|
|||
| Mark Anthony Laureta (5) | |
|
uhh...why are you looping without using its iterator? the 'i' have no any reference at all in your code. | |
|
|
|
| Bound (3) | |
|
Good catch! Haha I wish that was my error though, that was merely an error in summarizing my code over from the main base. So my original unhandled exceptions persist everyone! | |
|
|
|
| toum (203) | |
|
Your bool array only contains uninitialized pointers. You need to allocate memory for each ptr_array[i]. | |
|
|
|
| Bound (3) | |
| That was it, thanks a ton! | |
|
|
|