fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. #include <clocale>
  5.  
  6.  
  7. using namespace std;
  8.  
  9.  
  10. class Job
  11. {
  12. public:
  13. void lol(string text)
  14. {
  15. cout << "Вы написали = " << text << endl;
  16. }
  17. };
  18.  
  19.  
  20. int main()
  21. {
  22. Job job;
  23. string text;
  24. setlocale(LC_ALL, "Rus");
  25. cout << "Введите текст для вызова функци = ";
  26. cin >> text;
  27. job.lol(text);
  28. system("pause");
  29. return 0;
  30. }
  31.  
  32.  
Success #stdin #stdout #stderr 0s 5004KB
stdin
text
stdout
Введите текст для вызова функци =  Вы написали =  text
stderr
sh: pause: not found