diff --git a/TinySTL/Queue.h b/TinySTL/Queue.h new file mode 100644 index 0000000..c9d7388 --- /dev/null +++ b/TinySTL/Queue.h @@ -0,0 +1,17 @@ +#ifndef _QUEUE_H_ +#define _QUEUE_H_ + +#include "Deque.h" +#include "Vector.h" + +namespace TinySTL{ + //class of queue + template> + class queue{}; + //class of priority_queue + template , + class Compare = TinySTL::less> + class priority_queue{}; +} + +#endif \ No newline at end of file diff --git a/TinySTL/TinySTL.vcxproj b/TinySTL/TinySTL.vcxproj index 770fdc2..eb56b30 100644 --- a/TinySTL/TinySTL.vcxproj +++ b/TinySTL/TinySTL.vcxproj @@ -89,9 +89,13 @@ + + + + diff --git a/TinySTL/TinySTL.vcxproj.filters b/TinySTL/TinySTL.vcxproj.filters index 7dc41d5..e5fb7a4 100644 --- a/TinySTL/TinySTL.vcxproj.filters +++ b/TinySTL/TinySTL.vcxproj.filters @@ -65,5 +65,17 @@ 头文件 + + 头文件 + + + 头文件 + + + 头文件 + + + 头文件 + \ No newline at end of file diff --git a/TinySTL/main.cpp b/TinySTL/main.cpp index 02732b9..ace2624 100644 --- a/TinySTL/main.cpp +++ b/TinySTL/main.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -11,20 +12,25 @@ #include -#include "Bitmap.h" +#include "Algorithm.h" +#include "String.h" +#include "Vector.h" #include "Profiler\Profiler.h" -using namespace std; using namespace TinySTL::Profiler; int main(){ - std::string str("abcdefghijklmnpqrstuvwxyz"); - TinySTL::bitmap<26> bm; - for (auto it = str.cbegin(); it != str.cend(); ++it){ - bm.set(*it - 'a'); - } - cout << bm << endl; - cout << bm.size() << endl; + /*char array[] = "+C"; + TinySTL::string s("LoveC++"); + TinySTL::string str("ZXHLoveC++VeryMuch"); + cout << str.find_first_of(array, 0, str.size()) << endl;*/ + TinySTL::string name("zxh"); + //std::string name("zxh"); + + std::cout << "Please, enter your full name: "; + TinySTL::getline(std::cin, name,'i'); + //std::getline(std::cin, name); + std::cout << name << "\n"; system("pause"); return 0; }