Tabulator \t

0

edit

2

#include <iomanip> i std::setw

0

edit

0

Dalej tak samo? Pokaż kod.

0

tak działa std::setw

#include <iostream>
#include <iomanip>
#include <tuple>
#include <string>
#include <vector>

int main()
{
	using t = std::tuple<std::string, std::string, std::string>;
	std::vector<t> v { std::tie("abc", "def", "ghi"),
					   std::tie("abcd", "defg", "ghij"),
					   std::tie("abcde", "defgh", "ghijk")
					 };

	for(auto const& tup : v) {
		std::cout << std::setw(5) << std::get<0>(tup) << std::setw(10)
				  << std::get<1>(tup) << std::setw(6) << std::get<2>(tup)
				  << std::endl;
	}

	return 0;
}

http://ideone.com/Hf86XZ

1 użytkowników online, w tym zalogowanych: 0, gości: 1