jayteemoney
2012-09-03 17:57:08 UTC
error says transfer of control bypasses initialization
my for loop has an error stating
expression must have class type
and finally my if statements say
operands are incompatible (char* and char)
can somebody please help?????
here's my code:
#include
#include
using namespace std;
void Input();
int main()
{
Input();
char A,G,C,T,U;
int input;
int seq;
int complement;
cout<<" Choose your form of input "<
//error says transfer of control bypasses initialization
switch (input){
case 1:
char transcription[100];
ifstream sequence;
cin.getline(transcription, 100);
sequence.open(transcription);
if(!sequence.is_open()){
exit(EXIT_FAILURE);
}
char transcription2[100];
sequence>>transcription2;
while(sequence.good()){
cout<
//I might take out this for loop because I dont think I need it
//error here says expresion (transcription2) must have class type
for(int i=0; i<=transcription2.length(); i++){
//theres in error in all my if statements under the( == )sign saying
//operands are incompatible (char* and char)
if(transcription2 =='A'){
cout<<"U";
}
if(transcription2 =='G'){
cout<<"C";
}
if(transcription2 =='C'){
cout<<"G";
}
if(transcription2 =='T'){
cout<<"A";
}
else
{
cout<<"there was an error"<
sequence>>transcription2;
}
}
break;
case 2:
cout<<"Please enter your sequence: ";
cin>>seq;
cout<<"You Enterd: "<
cout<<"U";
}
if(seq=='G'){
cout<<"C";
}
if(seq=='C'){
cout<<"G";
}
if(seq=='T'){
cout<<"A";
}
else{
cout<<"Thats an invalid entry"<
default:
cout<<"That is an invalid option"<
return 0;
}
}