abseilのサンプルコードをビルドする(abseil-cppのabsl::StrJoin()を試す)
Setup
sudo apt-get install clang
sudo apt-get install git
git clone https://github.com/abseil/abseil-cpp.git
Sample Source Code
join.cpp
// from https://abseil.io/docs/cpp/quickstart
#include <iostream>
#include <string>
#include <vector>
#include "absl/strings/str_join.h"
int main()
{
std::vector<std::string> v = {"失礼", "熱盛と", "出てしまいました"};
std::string s = absl::StrJoin(v, "、");
std::cout << "Joined string: " << s << "\n";
return(0);
}
Build and Run
ROOT=.
clang++ -Wall -Wextra -std=c++11 -I "${ROOT}/abseil-cpp" join.cpp
./a.out
Output
Joined string: 失礼、熱盛と、出てしまいました
References
Thumbnail
sudo apt-get install clang
sudo apt-get install git
git clone https://github.com/abseil/abseil-cpp.git
join.cpp
// from https://abseil.io/docs/cpp/quickstart
#include <iostream>
#include <string>
#include <vector>
#include "absl/strings/str_join.h"
int main()
{
std::vector<std::string> v = {"失礼", "熱盛と", "出てしまいました"};
std::string s = absl::StrJoin(v, "、");
std::cout << "Joined string: " << s << "\n";
return(0);
}
Build and Run
ROOT=.
clang++ -Wall -Wextra -std=c++11 -I "${ROOT}/abseil-cpp" join.cpp
./a.out
Output
Joined string: 失礼、熱盛と、出てしまいました
References
Thumbnail
ROOT=.
clang++ -Wall -Wextra -std=c++11 -I "${ROOT}/abseil-cpp" join.cpp
./a.out
Joined string: 失礼、熱盛と、出てしまいました
References
Thumbnail
Author And Source
この問題について(abseilのサンプルコードをビルドする(abseil-cppのabsl::StrJoin()を試す)), 我々は、より多くの情報をここで見つけました https://qiita.com/kbutti/items/3cfb3b6baa18d3ea2d46著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .