#include <iostream>
#include <string>
#include <map>
using namespace std;
int main()
{
map<string, string> opposites;
opposites["A"] = "T";
opposites["T"] = "A";
opposites["C"] = "G";
opposites["G"] = "C";
string line = "AGATTATATAATGATAGGATTTAGATTGACCCGTCATGCAAGTCCATGCATGACAGC";
int promoter_index,i;
for (i = 0; i < line.length();i++)
{
if (line[i] == "T" && line[i+1] == "A" && line[i+2] == "T" && line[i+3] == "A" && line[i+4] == "A" && line[i+5] == "T")
promoter_index = i;
}
int start_of_sequence = promoter_index + 10;
cout << promoter_index;
}
我想在“行”中找到 TATAAT,但是当我尝试比较它时说“ISO C++ 禁止指针和整数之间的比较”。为什么?