fork download
  1. #include <iostream>
  2. #include <array>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. class AcademicDiscipline {
  7. string Name;
  8. int NumberOfSem;
  9. string LessonType;
  10. int Hours;
  11. string ControlType;
  12. array <string, 3> Instructors;
  13.  
  14. public:
  15. AcademicDiscipline(string Name, int NumberOfSem, string LessonType, int Hours, string ControlType,
  16. array <string, 3> Instructor):
  17. Name(Name), NumberOfSem(NumberOfSem), LessonType(LessonType), Hours(Hours), ControlType(ControlType),
  18. Instructors(Instructor)
  19. {
  20. }
  21.  
  22. AcademicDiscipline(const AcademicDiscipline &other) {
  23. *this = other;
  24. }
  25.  
  26. string getName() const {
  27. return Name;
  28. }
  29.  
  30. int getSemNumber() const {
  31. return NumberOfSem;
  32. }
  33.  
  34. string getLessonType() const {
  35. return LessonType;
  36. }
  37.  
  38. int getHours() const {
  39. return Hours;
  40. }
  41.  
  42. string getControlType() const {
  43. return ControlType;
  44. }
  45.  
  46. string getInstructors() const {
  47. string result;
  48. // for(int i =0; i<Instructors.size(); i++)
  49. // {
  50. // result += Instructors[i] + '; ';
  51. // }
  52. for(auto &elem: Instructors)
  53. { result += "Name: " + elem + "; ";}
  54. return result;
  55. }
  56.  
  57. AcademicDiscipline& operator=(const AcademicDiscipline& other){
  58. if (this != &other) {
  59. this->Name = other.Name;
  60. this->NumberOfSem = other.NumberOfSem;
  61. this->LessonType = other.LessonType;
  62. this->Hours = other.Hours;
  63. this->ControlType = other.ControlType;
  64. this->Instructors = other.Instructors;
  65. }
  66. return *this;
  67. }
  68.  
  69. bool operator==(const AcademicDiscipline& other){
  70. bool res;
  71. if (this -> Name == other.Name and this -> NumberOfSem == other.NumberOfSem)
  72. {
  73. res = true;
  74. }
  75. res = false;
  76.  
  77. return res;
  78. }
  79.  
  80. bool operator !=(const AcademicDiscipline& other) {
  81. return !(*this == other);
  82. }
  83.  
  84. ostream& operator << (ostream& os, const AcademicDiscipline &obj) {
  85. os << "Discipline: " << obj.getName() << ", Number of semester: " << obj.getSemNumber();
  86. os << "\nLesson type" << obj.getLessonType() << ", Control type: " << obj.getControlType();
  87. os << "\nAmount of hours: " << obj.getHours();
  88. os << "\nInstructors: " << obj.getInstructors();
  89. return os;
  90. }
  91.  
  92. void AddInstructor(string NewName){
  93. Instructors.fill(NewName);
  94. }
  95.  
  96. void CorrectInstructor(string PrevName, string NewName){
  97. for (auto &elem: Instructors){
  98. if (elem.data() == PrevName){
  99. elem = NewName;
  100. }
  101.  
  102. }
  103. }
  104.  
  105. ~AcademicDiscipline(){
  106.  
  107. }
  108.  
  109. };
  110.  
  111. int main(){
  112.  
  113. array <string,3> proff;
  114. proff.fill("Ivanov Ivan Ivanovich");
  115. proff.fill("Petrov Petr Petrovich");
  116.  
  117. string disc_name = "C++";
  118. string lesson = "lection";
  119. string control = "exam";
  120.  
  121. AcademicDiscipline disc(disc_name, 1, lesson, 60, control, proff);
  122.  
  123. AcademicDiscipline yet_another_disc(disc);
  124.  
  125. cout << disc;
  126.  
  127. disc.AddInstructor("Semenov Semen Semenovich");
  128. disc.CorrectInstructor("Petrov Petr Petrovich", "Sidorov Sidor Sidorovich");
  129.  
  130.  
  131. int res;
  132. cin >> res;
  133. return res;
  134. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:84:70: error: 'std::ostream& AcademicDiscipline::operator<<(std::ostream&, const AcademicDiscipline&)' must take exactly one argument
     ostream& operator << (ostream& os, const AcademicDiscipline  &obj) {
                                                                      ^
prog.cpp: In function 'int main()':
prog.cpp:125:10: error: no match for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'AcademicDiscipline')
     cout << disc;
          ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:108:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(__ostream_type& (*__pf)(__ostream_type&))
       ^
/usr/include/c++/5/ostream:108:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&) {aka std::basic_ostream<char>& (*)(std::basic_ostream<char>&)}'
/usr/include/c++/5/ostream:117:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]
       operator<<(__ios_type& (*__pf)(__ios_type&))
       ^
/usr/include/c++/5/ostream:117:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&) {aka std::basic_ios<char>& (*)(std::basic_ios<char>&)}'
/usr/include/c++/5/ostream:127:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(ios_base& (*__pf) (ios_base&))
       ^
/usr/include/c++/5/ostream:127:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'std::ios_base& (*)(std::ios_base&)'
/usr/include/c++/5/ostream:166:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(long __n)
       ^
/usr/include/c++/5/ostream:166:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'long int'
/usr/include/c++/5/ostream:170:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(unsigned long __n)
       ^
/usr/include/c++/5/ostream:170:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'long unsigned int'
/usr/include/c++/5/ostream:174:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(bool __n)
       ^
/usr/include/c++/5/ostream:174:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'bool'
In file included from /usr/include/c++/5/ostream:638:0,
                 from /usr/include/c++/5/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/5/bits/ostream.tcc:91:5: note: candidate: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]
     basic_ostream<_CharT, _Traits>::
     ^
/usr/include/c++/5/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'short int'
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:181:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(unsigned short __n)
       ^
/usr/include/c++/5/ostream:181:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'short unsigned int'
In file included from /usr/include/c++/5/ostream:638:0,
                 from /usr/include/c++/5/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/5/bits/ostream.tcc:105:5: note: candidate: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]
     basic_ostream<_CharT, _Traits>::
     ^
/usr/include/c++/5/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'int'
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:192:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(unsigned int __n)
       ^
/usr/include/c++/5/ostream:192:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'unsigned int'
/usr/include/c++/5/ostream:201:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(long long __n)
       ^
/usr/include/c++/5/ostream:201:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'long long int'
/usr/include/c++/5/ostream:205:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(unsigned long long __n)
       ^
/usr/include/c++/5/ostream:205:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'long long unsigned int'
/usr/include/c++/5/ostream:220:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(double __f)
       ^
/usr/include/c++/5/ostream:220:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'double'
/usr/include/c++/5/ostream:224:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(float __f)
       ^
/usr/include/c++/5/ostream:224:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'float'
/usr/include/c++/5/ostream:232:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(long double __f)
       ^
/usr/include/c++/5/ostream:232:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'long double'
/usr/include/c++/5/ostream:245:7: note: candidate: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
       operator<<(const void* __p)
       ^
/usr/include/c++/5/ostream:245:7: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'const void*'
In file included from /usr/include/c++/5/ostream:638:0,
                 from /usr/include/c++/5/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/5/bits/ostream.tcc:119:5: note: candidate: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]
     basic_ostream<_CharT, _Traits>::
     ^
/usr/include/c++/5/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from 'AcademicDiscipline' to 'std::basic_ostream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}'
In file included from /usr/include/c++/5/string:52:0,
                 from /usr/include/c++/5/bits/locale_classes.h:40,
                 from /usr/include/c++/5/bits/ios_base.h:41,
                 from /usr/include/c++/5/ios:42,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/5/bits/basic_string.h:5170:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
     operator<<(basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/basic_string.h:5170:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/bits/ios_base.h:46:0,
                 from /usr/include/c++/5/ios:42,
                 from /usr/include/c++/5/ostream:38,
                 from /usr/include/c++/5/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/5/system_error:209:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)
     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
     ^
/usr/include/c++/5/system_error:209:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'const std::error_code&'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:497:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
     ^
/usr/include/c++/5/ostream:497:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   deduced conflicting types for parameter '_CharT' ('char' and 'AcademicDiscipline')
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:502:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
     ^
/usr/include/c++/5/ostream:502:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'char'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:508:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)
     operator<<(basic_ostream<char, _Traits>& __out, char __c)
     ^
/usr/include/c++/5/ostream:508:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'char'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:514:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)
     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
     ^
/usr/include/c++/5/ostream:514:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'signed char'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:519:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)
     operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
     ^
/usr/include/c++/5/ostream:519:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'unsigned char'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:539:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)
     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
     ^
/usr/include/c++/5/ostream:539:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   mismatched types 'const _CharT*' and 'AcademicDiscipline'
     cout << disc;
             ^
In file included from /usr/include/c++/5/ostream:638:0,
                 from /usr/include/c++/5/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/5/bits/ostream.tcc:321:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)
     operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
     ^
/usr/include/c++/5/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'const char*'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:556:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)
     operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
     ^
/usr/include/c++/5/ostream:556:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'const char*'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:569:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)
     operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
     ^
/usr/include/c++/5/ostream:569:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'const signed char*'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:574:5: note: candidate: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)
     operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
     ^
/usr/include/c++/5/ostream:574:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'const unsigned char*'
     cout << disc;
             ^
In file included from /usr/include/c++/5/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/5/ostream:628:5: note: candidate: std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = AcademicDiscipline] <near match>
     operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
     ^
/usr/include/c++/5/ostream:628:5: note:   conversion of argument 1 would be ill-formed:
prog.cpp:125:13: error: cannot bind 'std::ostream {aka std::basic_ostream<char>}' lvalue to 'std::basic_ostream<char>&&'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:49:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.h:1276:5: note: candidate: template<class _RandomNumberEngine, unsigned int __w, class _UIntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::independent_bits_engine<_RandomNumberEngine, __w, _UIntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.h:1276:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::independent_bits_engine<_RandomNumberEngine, __w, _UIntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:477:5: note: candidate: template<class _UIntType1, unsigned int __w1, unsigned int __n1, unsigned int __m1, unsigned int __r1, _UIntType1 __a1, unsigned int __u1, _UIntType1 __d1, unsigned int __s1, _UIntType1 __b1, unsigned int __t1, _UIntType1 __c1, unsigned int __l1, _UIntType1 __f1, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:477:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1029:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::uniform_int_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1029:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::uniform_int_distribution<_IntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1088:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::uniform_real_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1088:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::uniform_real_distribution<_IntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2275:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::cauchy_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2275:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::cauchy_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1150:5: note: candidate: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::bernoulli_distribution&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1150:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   cannot convert 'disc' (type 'AcademicDiscipline') to type 'const std::bernoulli_distribution&'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2050:5: note: candidate: template<class _RealType1, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::normal_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2050:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::normal_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1232:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::geometric_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1232:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::geometric_distribution<_IntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2596:5: note: candidate: template<class _RealType1, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::gamma_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2596:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::gamma_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1883:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::exponential_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1883:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::exponential_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2674:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::weibull_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2674:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::weibull_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2750:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::extreme_value_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2750:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::extreme_value_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:156:5: note: candidate: template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::linear_congruential_engine<_UIntType, __a, __c, __m>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:156:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::linear_congruential_engine<_UIntType, __a, __c, __m>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:632:5: note: candidate: template<class _UIntType, unsigned int __w, unsigned int __s, unsigned int __r, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::subtract_with_carry_engine<_UIntType, __w, __s, __r>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:632:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::subtract_with_carry_engine<_UIntType, __w, __s, __r>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:702:5: note: candidate: template<class _RandomNumberEngine, unsigned int __p, unsigned int __r, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::discard_block_engine<_RandomNumberEngine, __p, __r>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:702:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::discard_block_engine<_RandomNumberEngine, __p, __r>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:831:5: note: candidate: template<class _RandomNumberEngine, unsigned int __k, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::shuffle_order_engine<_RandomNumberEngine, __k>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:831:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::shuffle_order_engine<_RandomNumberEngine, __k>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1347:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::negative_binomial_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1347:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::negative_binomial_distribution<_IntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1552:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::poisson_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1552:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::poisson_distribution<_IntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:1819:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::binomial_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:1819:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::binomial_distribution<_IntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2115:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::lognormal_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2115:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::lognormal_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2188:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::chi_squared_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2188:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::chi_squared_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2352:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::fisher_f_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2352:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::fisher_f_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2427:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::student_t_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2427:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::student_t_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:2886:5: note: candidate: template<class _IntType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::discrete_distribution<_IntType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:2886:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::discrete_distribution<_IntType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:3096:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::piecewise_constant_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:3096:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::piecewise_constant_distribution<_RealType>'
     cout << disc;
             ^
In file included from /usr/include/c++/5/random:51:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from prog.cpp:3:
/usr/include/c++/5/bits/random.tcc:3312:5: note: candidate: template<class _RealType, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::piecewise_linear_distribution<_RealType>&)
     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
     ^
/usr/include/c++/5/bits/random.tcc:3312:5: note:   template argument deduction/substitution failed:
prog.cpp:125:13: note:   'AcademicDiscipline' is not derived from 'const std::piecewise_linear_distribution<_RealType>'
     cout << disc;
             ^
stdout
Standard output is empty