This seems simple, but i am struggling with it. I have coded a decoder from Hamming to Grey to Binary. I then need to take the resulting number I get from this decoding, and lookup in a char array that I read in the resulting letter to output. I'm not sure how to do this. My code works and produces the correct results. So say I have the number 46. I need to output the character that corresponds to the 46th element of the array. I'm just not sure how to put it all together. This is done as I am reading in the Hamming code file, so I cannot just do it manually.
Loop through all the numbers, the loop variable and the loop variable passed to your decoder function will give you index and value to initialize one element in the array.