Last active
February 16, 2016 09:54
-
-
Save miloyip/3cfc08eabb6f2c2ed7f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "rapidjson/document.h" | |
#include <iostream> | |
#include <pthread.h> | |
void* MyThread(void*) | |
{ | |
std::cout << "Start of MyThread" << std::endl; | |
rapidjson::Document doc; | |
doc.Parse("{ \"NAME\": \"Peter\", \"AGE\": 38, \"Male\": true}"); | |
std::cout << "End!"; | |
return NULL; | |
} | |
int main(int argc, char** argv) | |
{ | |
pthread_t thread; | |
pthread_create(&thread, NULL, &MyThread, NULL); | |
std::string str; | |
std::cout << "Press return..." << std::endl; | |
std::getline(std::cin, str); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment