Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <set>
- #include <string>
- #include <vector>
- using namespace std;
- class SearchServer {
- // Содержимое раздела public: доступно для вызова из кода вне класса
- public:
- int GetStopWordsSize() const {
- return stop_words_.size();
- }
- // Содержимое раздела private: доступно только внутри методов самого класса
- private:
- struct DocumentContent {
- int id = 0;
- vector<string> words;
- };
- DocumentContent documents_;
- set<string> stop_words_;
- };
- int GetStopWordsSize(const SearchServer& server) {
- return server.GetStopWordsSize();
- }
- int main() {
- SearchServer server;
- std::cout << GetStopWordsSize(server) << std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement