Hey guys! I'm new to CPP, and coding in general. Any help is appreciated! I'm working on a project right now that involves DNA encoding.
Using the following chart,
I needed to write a function in which a user would type in five of the letters denoted "IUPAC Notation", and it would form all the possible strands using the codons. For example, if someone entered the following characters in the following order (M,W,Q,W,H), the program would print
I have a good idea of how to do it using nested for loops, my problem is with the arrays I have written. We aren't allowed to use strings, so I made character arrays for each codon. I then made arrays of those arrays to represent the amino acids (in IUPAC notation). We haven't learned about pointers, yet, so I had to learn that on my own. So i declared the arrays of the amino acids as char*, but I can't seem to use those arrays within the function I have written. Since I need the array to correspond to the input, I tried making a function that would take the input character, and return the array, but the compiler refused. Any suggestions? I'm kind of lost, since I can't figure out any solution that doesn't use strings, and we haven't learned about pointers yet.