diff --git a/TinySTL/Bitmap.h b/TinySTL/Bitmap.h index c8bd46f..fab35aa 100644 --- a/TinySTL/Bitmap.h +++ b/TinySTL/Bitmap.h @@ -22,7 +22,6 @@ namespace TinySTL{ enum EAlign{ ALIGN = 8 }; public: bitmap(); - explicit bitmap(const std::string& str);//TODO //Returns the number of bits in the bitset that are set (i.e., that have a value of one) size_t count() const; diff --git a/TinySTL/main.cpp b/TinySTL/main.cpp index 3985bc9..02732b9 100644 --- a/TinySTL/main.cpp +++ b/TinySTL/main.cpp @@ -1,29 +1,30 @@ #include #include #include +#include #include #include #include #include +#include #include #include -#include "CircularBuffer.h" +#include "Bitmap.h" #include "Profiler\Profiler.h" using namespace std; using namespace TinySTL::Profiler; int main(){ - TinySTL::circular_buffer cb(10000, 0); - //boost::circular_buffer cb(10000, 0); - ProfilerInstance::start(); - for (int i = 0; i != 100; ++i){ - cb.push_back(i); + std::string str("abcdefghijklmnpqrstuvwxyz"); + TinySTL::bitmap<26> bm; + for (auto it = str.cbegin(); it != str.cend(); ++it){ + bm.set(*it - 'a'); } - ProfilerInstance::finish(); - ProfilerInstance::dumpDuringTime(); + cout << bm << endl; + cout << bm.size() << endl; system("pause"); return 0; }