24 lines
332 B
C++
24 lines
332 B
C++
#pragma once
|
|
|
|
#define EXERCISM_RUN_ALL_TESTS
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
|
|
namespace dna {
|
|
|
|
typedef std::map<char, int> NucleotideCounts;
|
|
|
|
class counter
|
|
{
|
|
NucleotideCounts nucleotide_counts_;
|
|
|
|
public:
|
|
|
|
counter(const std::string &str);
|
|
NucleotideCounts nucleotide_counts() const;
|
|
int count(char c) const;
|
|
};
|
|
|
|
}
|