Moving some code from Python to C++.
BASEPAIRS = { \"T\": \"A\", \"A\": \"T\", \"G\": \"C\", \"C\": \"G\" }
Thinking maps might be overkill? W
Here's the map solution:
#include #include typedef std::map BasePairMap; int main() { BasePairMap m; m['A'] = 'T'; m['T'] = 'A'; m['C'] = 'G'; m['G'] = 'C'; std::cout << "A:" << m['A'] << std::endl; std::cout << "T:" << m['T'] << std::endl; std::cout << "C:" << m['C'] << std::endl; std::cout << "G:" << m['G'] << std::endl; return 0; }