string matching

program should find positions at which the small dna strand can attach to longer
dna strand.
this doesnt work
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
	for ( string::iterator i=longers.begin();i!=longers.end();i++) {
		 
		
	for (string::iterator it = shorters.begin();it!=shorters.end();it++){
		     		
           		
			if (*it == 'A'){ 
            *it++; 
            }
            if(*it == 'T'){
               *it++;
              }
            if (*it == 'C'){
               *it++;
            }
            if (*it == 'G'){
               *it++;   
            }

        
            found = ls.find(ss);
            if (found!=std::string::npos)
cout<<found;
Last edited on
You have to explain more.

What are those "dna strands" and what is required for successful "attachment"?

What are the types of "longers" and "shorters"?
Topic archived. No new replies allowed.