In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge points about how to install and configure Jsoncpp under CentOS. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
1. Installation
Execute a command
[root@VM-0-9-centos ~] # cd / home [root @ VM-0-9-centos home] # mkdir jsoncp [root @ VM-0-9-centos home] # cd jsoncpp/ [root @ VM-0-9-centos jsoncpp] # wget https://github.com/open-source-parsers/jsoncpp/archive/1.9.4.zip[root@VM-0-9-centos jsoncpp] # unzip 1.9.4.zip [root @ VM-0-9-centos jsoncpp] # Cd jsoncpp-1.9.4/ [root@VM-0-9-centos jsoncpp-1.9.4] # cmake. [root@VM-0-9-centos jsoncpp-1.9.4] # make[ root @ VM-0-9-centos jsoncpp-1.9.4] # make install2. test
Create a test folder and two files
[root@VM-0-9-centos jsoncpp-1.9.4] # mkdir Xltest [root @ VM-0-9-centos jsoncpp-1.9.4] # cd Xltest [root @ VM-0-9-centos xltest] # vim jsontest.json [root @ VM-0-9-centos xltest] # vim jsontest.cpp
The jsontest.json is as follows
[{"name": "Long", "age": 6}]
Jsontest.cpp is as follows
# include # include using namespace std;int main (void) {ifstream ifs; ifs.open ("jsontest.json"); assert (ifs.is_open ()); Json::Reader reader; Json::Value root; if (! reader.parse (ifs, root, false)) {cout
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.