Maybe your problem is line 18 not sure why its there or what its doing. Also I think you would be better off using a pointer instead of  but thats just me. I haven't used  array in a class so not sure if thats even how you declare it.
@ line 18, you are not creating an array of size 32, you are attempting to set the value of the array @ element 32.
One way to fix this:
Remove line 18 completely. Change line 13 from
Any time you get a segfault error when compiling and you've been playing with arrays, chances are you tried to read/write outside of the array. A classic example is messing up a for loop by going 1 too many iterations.