Question: Please can you explain this code please? #include #include #include #include using namespace std; const string DNA = ACTGCGACGGTACGCTTCGACGTAG; const size_t taille = DNA.size(); size_t
Please can you explain this code please? #include
using namespace std;
const string DNA = "ACTGCGACGGTACGCTTCGACGTAG"; const size_t taille = DNA.size();
size_t m = 3; vector
/* struct DNA{ const string dna; // chaine saisie pour l'utilisateur size_t taille; // Taille de la chaine string chaine; // Chaine chercher }; */
// what kind of structs can i create? for me it's stupid to make any struct in this program.
bool checkDNA(string &s); string takeStrings(const string &s,size_t i, size_t m); void FindSequenceDNA(vector
int main(){
string DNAuser; cout << "Introduce the DNA: "; cin >> DNAuser;
bool request; cout << boolalpha; request = DNAuser.find_first_not_of("AGCT"); cout << request << endl;
vector // string res = takeStrings(DNA,0,3); // cout << "res: " << res << endl; // cout << "Printing vector: " << endl; // I just need to find the other, the practice is almost done. for(size_t i = 0; i< vectorSq.size(); i++){ cout << vectorSq[i] << endl; } return 0; } string takeStrings(const string &s,size_t i, size_t m){ string result; size_t aux=i; if(s.size()==0){ cout << "String is empty." << endl; } else{ for(;i } return result; } void FindSequenceDNA(vector } bool checkDNA(string &s){ bool res; if(s.size()==0 || s.size()<3){ cout << "DNA invalid" << endl; } else{ for(size_t i=0;i size_t incrementValue(size_t &m){ if(m
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
