summaryrefslogtreecommitdiff
path: root/CPP/cpp_book/chap6/find_url/main.cpp
blob: 8bd94168730ba9ff8593284f6173a164ba85c45b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include <vector>
#include <algorithm>

std::vector<std::string> find_urls(const std::string& s);

int
main(void)
{
	std::string s;

	while(std::getline(std::cin, s)) {
		std::vector<std::string> urls;
		urls = find_urls(s);

		std::vector<std::string>::const_iterator i = urls.begin();

		while (i != urls.end()) {
			std::cout << *i << std::endl;
			i++;
		}
	}

	return 0;
}