diff options
| author | Carlos Maiolino <[email protected]> | 2026-02-20 16:17:14 +0100 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2026-02-20 16:17:14 +0100 |
| commit | 4ff0e42f65d8bba3d21bed53bfe1251d8db5c13f (patch) | |
| tree | 9ac61873e2676c3f392bd26063afeb16897c3902 /CPP/cpp_book/chap6/find_url/main.cpp | |
| parent | fd313dd5ad9ac067a31f2b1760b85bd305567131 (diff) | |
Diffstat (limited to 'CPP/cpp_book/chap6/find_url/main.cpp')
| -rw-r--r-- | CPP/cpp_book/chap6/find_url/main.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/CPP/cpp_book/chap6/find_url/main.cpp b/CPP/cpp_book/chap6/find_url/main.cpp new file mode 100644 index 0000000..8bd9416 --- /dev/null +++ b/CPP/cpp_book/chap6/find_url/main.cpp @@ -0,0 +1,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; +} + |
