Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://app.pluralsight.com/course-player?clipId=9591b217-52b1-41d4-97d8-498731301073
- //https://bit.ly/freePS2020
- //RECOMMENDED: VS2019 COMMUNITY [FREE IDE] @ https://bit.ly/3mYgad3
- //includes.h
- #include <iostream>
- using std::cout;
- using std::cin;
- #include <string>
- using std::string;
- #include <vector>
- using std::vector;
- using std::begin;
- using std::count;
- #include <algorithm>
- using std::sort;
- using std::count;
- //collections.cpp
- #include "includes.h"
- int main()
- {
- vector<int> nums;
- for (int i = 0; i < 10; i++)
- {
- nums.push_back(i);
- }
- for (auto item : nums)
- {
- cout << item << " ";
- }
- cout << "\n";
- vector<string> words;
- cout << "Enter Three Words: "
- for (int i = 0; i < 3; i++)
- {
- string s;
- cin >> s;
- words.push_back(s);
- }
- for (auto item: words)
- {
- cout << item << " ";
- }
- cout << "\n";
- cout << "int vector nums has " << nums.size() << " elements." << '\n\;
- }
Add Comment
Please, Sign In to add comment