본문 바로가기

C++60

string_view ][ c++1z string_view ][ c++1z 1.소스 #include #include void* operator new(std::size_t n) { std::cout 2016. 9. 20.
poco c++ ][ 설치및 hello world 찍기 poco c++ ][ 설치및 hello world 찍기 ace wrapper과boost 와 함께 모던 c++라이브러리중 하나. 윈도우/리눅스/안드로이드/os x/임베디드 시스템등을 지원 "Without a good library, most interesting tasks are hard to do in C++; but given a good library, almost any task can be made easy." - Bjarne Stroustrup 1. overview 2. 소스 다운로드 3. install ( . poco.sh ) 4. 소스1 ( poco_helloworld.cpp ) 컴파일하기 5. 소스2 (reference-counting.cpp) 컴파일하기 2016. 8. 4.
pattern matching pattern matching 1.소스 // C++ program to implement wildcard // pattern matching algorithm #include #include #include using namespace std; // Function that matches input str with // given wildcard pattern bool strmatch( char str[], char pattern[], int n , int m ) { // empty pattern can only match with // empty string if (m == 0) return (n == 0); // lookup table for storing results of // subproblem.. 2016. 8. 3.
stack stack 1.소스 #include #include using namespace std; // User defined stack that uses a queue class Stack { public: queueq; public: void push(int val); void pop(); int top(); bool empty(); }; // Push operation void Stack::push(int val) { // Get previous size of queue int s = q.size(); // Push current element q.push(val); // Pop (or Dequeue) all previous // elements and put them after current // elem.. 2016. 8. 3.