0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

abseilのサンプルコードをビルドする(abseil-cppのabsl::StrJoin()を試す)

Last updated at Posted at 2017-09-28

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

join_thumb.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?