Hello to all, newbie here.
I need help with my function. Here is the code for the function:
I am trying to return the output to the variable "loadedSequences[nSequences].type" which is a character array with the following statement:Code:char content_scan( char sequence) { int x ; for(x=0 ; x < (strlen(sequence)) ; x++) { while( sequence[x] ) { if( sequence[x] == 'U' ) { return "RNA" ; break ; } else if (sequence[x] == 'A' || x == 'C' || x == 'G' || x == 'T') { return "DNA" ; break ; } else { return "PROTEIN" ; continue ; } } } }
The argument for the function will be a long string of letters.Code:loadedSequences[nSequences].type = content_scan(loadedSequences[nSequences].data) ;
Any help would be great.