#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++禁止在指針和整數之間進行比較」。爲什麼?指針和整數錯誤之間的比較