fork download
  1. include "stdafx.h"
  2. #include <iostream>
  3. #include <math.h>
  4. using namespace std;
  5. double a[4][4]={{17, 1, 12, 0},
  6. {10, 19, 3, 1},
  7. {-1, -3, 21, 1},
  8. {1, 3, 5, 13}};
  9. double b[4]={1, 17, 13, 10};
  10. double x[4]={0, 0, 0, 0};
  11. double e=0.001;
  12. bool shod(double a[4][4]){
  13. bool s0=fabs(a[0][0])>fabs(a[0][1])+fabs(a[0][2])+fabs(a[0][3]);
  14. bool s1=fabs(a[1][1])>fabs(a[1][0])+fabs(a[1][2])+fabs(a[1][3]);
  15. bool s2=fabs(a[2][2])>fabs(a[2][0])+fabs(a[2][1])+fabs(a[2][3]);
  16. bool s3=fabs(a[3][3])>fabs(a[3][0])+fabs(a[3][1])+fabs(a[3][2]);
  17. if(s0 && s1 && s2 && s3)return true;
  18. else return false;
  19. }
  20. bool toch(double b[4], double c[4]){
  21. int i=0;
  22. for(i=0; i<4; i++){
  23. if(fabs(b[i]-c[i])>e){
  24. return false;
  25. }
  26. }
  27. return true;
  28. }
  29. void pr_iter(){
  30. double x0[4]={-1,-1,-1,-1};
  31. int k_iter=0, i;
  32. if(shod(a)==true){
  33. while(toch(x0,x)==false){
  34. k_iter++;
  35. for(i=0; i<4; i++){
  36. x0[i]=x[i];
  37. }
  38. x[0]=(b[0]-a[0][1]*x0[1]-a[0][2]*x0[2]-a[0][3]*x0[3])/a[0][0];
  39. x[1]=(b[1]-a[1][0]*x0[0]-a[1][2]*x0[2]-a[1][3]*x0[3])/a[1][1];
  40. x[2]=(b[2]-a[2][0]*x0[0]-a[2][1]*x0[1]-a[2][3]*x0[3])/a[2][2];
  41. x[3]=(b[3]-a[3][0]*x0[0]-a[3][1]*x0[1]-a[3][2]*x0[2])/a[3][3];
  42. }
  43. }
  44. cout<<"Metod prostoi iteracii: k = "<<k_iter<<endl;
  45. for(i=0; i<4; i++){
  46. cout<<"\tx["<<i+1<<"] = "<<x[i]<<endl;
  47. }
  48. }
  49. void zeid(){
  50. double x0[4]={-1,-1,-1,-1};
  51. int k_iter=0, i;
  52. for(i=0; i<4; i++) x[i]=0;
  53. if(shod(a)==true){
  54. while(toch(x0,x)==false){
  55. k_iter++;
  56. for(i=0; i<4; i++){
  57. x0[i]=x[i];
  58. }
  59. x[0]=(b[0]-a[0][1]*x0[1]-a[0][2]*x0[2]-a[0][3]*x0[3])/a[0][0];
  60. x[1]=(b[1]-a[1][0]*x[0]-a[1][2]*x0[2]-a[1][3]*x0[3])/a[1][1];
  61. x[2]=(b[2]-a[2][0]*x[0]-a[2][1]*x[1]-a[2][3]*x0[3])/a[2][2];
  62. x[3]=(b[3]-a[3][0]*x[0]-a[3][1]*x[1]-a[3][2]*x[2])/a[3][3];
  63. }
  64. }
  65. cout<<"Metod Zeidelya: k = "<<k_iter<<endl;
  66. for(i=0; i<4; i++){
  67. cout<<"\tx["<<i+1<<"] = "<<x[i]<<endl;
  68. }
  69. }
  70. int main(){
  71. pr_iter();
  72. zeid();
  73. return 0;
  74. }
  75.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:1: error: 'include' does not name a type
 include "stdafx.h"
 ^
In file included from /usr/include/c++/4.9/iosfwd:40:0,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/postypes.h:98:11: error: 'ptrdiff_t' does not name a type
   typedef ptrdiff_t streamsize; // Signed integral type
           ^
In file included from /usr/include/c++/4.9/exception:162:0,
                 from /usr/include/c++/4.9/ios:39,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/exception_ptr.h:95:30: error: field 'nullptr_t' has incomplete type 'std::__exception_ptr::exception_ptr'
       exception_ptr(nullptr_t) noexcept
                              ^
/usr/include/c++/4.9/bits/exception_ptr.h:95:30: error: expected ';' at end of member declaration
/usr/include/c++/4.9/bits/exception_ptr.h:95:32: error: expected unqualified-id before 'noexcept'
       exception_ptr(nullptr_t) noexcept
                                ^
In file included from /usr/include/c++/4.9/bits/stl_algobase.h:62:0,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/type_traits.h:160:35: error: '__gnu_cxx::__is_null_pointer' declared as an 'inline' variable
   __is_null_pointer(std::nullptr_t)
                                   ^
/usr/include/c++/4.9/ext/type_traits.h:160:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of symbol
/usr/include/c++/4.9/ext/type_traits.h:155:5: note: previous declaration 'template<class _Type> bool __gnu_cxx::__is_null_pointer(_Type)'
     __is_null_pointer(_Type)
     ^
/usr/include/c++/4.9/ext/type_traits.h:160:21: error: 'nullptr_t' is not a member of 'std'
   __is_null_pointer(std::nullptr_t)
                     ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:294:31: error: 'std::size_t' has not been declared
   template<typename _Tp, std::size_t _Size>
                               ^
/usr/include/c++/4.9/type_traits:493:37: error: 'nullptr_t' is not a member of 'std'
     struct __is_null_pointer_helper<std::nullptr_t>
                                     ^
/usr/include/c++/4.9/type_traits:493:37: error: 'nullptr_t' is not a member of 'std'
/usr/include/c++/4.9/type_traits:493:51: error: template argument 1 is invalid
     struct __is_null_pointer_helper<std::nullptr_t>
                                                   ^
/usr/include/c++/4.9/type_traits:1336:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, __alignof__(_Tp)> { };
                                ^
/usr/include/c++/4.9/type_traits:1336:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1336:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, __alignof__(_Tp)> { };
                                ^
/usr/include/c++/4.9/type_traits:1336:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1336:61: error: template argument 1 is invalid
     : public integral_constant<std::size_t, __alignof__(_Tp)> { };
                                                             ^
/usr/include/c++/4.9/type_traits:1336:61: note: invalid template non-type parameter
/usr/include/c++/4.9/type_traits:1341:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 0> { };
                                ^
/usr/include/c++/4.9/type_traits:1341:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1341:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 0> { };
                                ^
/usr/include/c++/4.9/type_traits:1341:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1341:46: error: template argument 1 is invalid
     : public integral_constant<std::size_t, 0> { };
                                              ^
/usr/include/c++/4.9/type_traits:1341:46: note: invalid template non-type parameter
/usr/include/c++/4.9/type_traits:1343:31: error: 'std::size_t' has not been declared
   template<typename _Tp, std::size_t _Size>
                               ^
/usr/include/c++/4.9/type_traits:1345:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
                                ^
/usr/include/c++/4.9/type_traits:1345:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1345:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
                                ^
/usr/include/c++/4.9/type_traits:1345:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1345:65: error: template argument 1 is invalid
     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
                                                                 ^
/usr/include/c++/4.9/type_traits:1345:65: note: invalid template non-type parameter
/usr/include/c++/4.9/type_traits:1349:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
                                ^
/usr/include/c++/4.9/type_traits:1349:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1349:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
                                ^
/usr/include/c++/4.9/type_traits:1349:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1349:65: error: template argument 1 is invalid
     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
                                                                 ^
/usr/include/c++/4.9/type_traits:1349:65: note: invalid template non-type parameter
/usr/include/c++/4.9/type_traits:1354:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 0> { };
                                ^
/usr/include/c++/4.9/type_traits:1354:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1354:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t, 0> { };
                                ^
/usr/include/c++/4.9/type_traits:1354:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1354:46: error: template argument 1 is invalid
     : public integral_constant<std::size_t, 0> { };
                                              ^
/usr/include/c++/4.9/type_traits:1354:46: note: invalid template non-type parameter
/usr/include/c++/4.9/type_traits:1356:47: error: 'std::size_t' has not been declared
   template<typename _Tp, unsigned _Uint, std::size_t _Size>
                                               ^
/usr/include/c++/4.9/type_traits:1358:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t,
                                ^
/usr/include/c++/4.9/type_traits:1358:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1358:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t,
                                ^
/usr/include/c++/4.9/type_traits:1358:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1360:28: error: template argument 1 is invalid
           _Uint - 1>::value>
                            ^
/usr/include/c++/4.9/type_traits:1360:28: note: invalid template non-type parameter
/usr/include/c++/4.9/type_traits:1365:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t,
                                ^
/usr/include/c++/4.9/type_traits:1365:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1365:32: error: 'size_t' is not a member of 'std'
     : public integral_constant<std::size_t,
                                ^
/usr/include/c++/4.9/type_traits:1365:32: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/bits/move.h:57:0,
                 from /usr/include/c++/4.9/bits/stl_pair.h:59,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/type_traits:1367:31: error: template argument 1 is invalid
              _Uint - 1>::value>
                               ^
/usr/include/c++/4.9/type_traits:1367:31: note: invalid template non-type parameter
/usr/include/c++/4.9/type_traits:1787:31: error: 'std::size_t' has not been declared
   template<typename _Tp, std::size_t _Size>
                               ^
/usr/include/c++/4.9/type_traits:1800:31: error: 'std::size_t' has not been declared
   template<typename _Tp, std::size_t _Size>
                               ^
/usr/include/c++/4.9/type_traits:1859:17: error: 'std::size_t' has not been declared
   template<std::size_t _Len>
                 ^
/usr/include/c++/4.9/type_traits:1879:17: error: 'std::size_t' has not been declared
   template<std::size_t _Len, std::size_t _Align =
                 ^
/usr/include/c++/4.9/type_traits:1879:35: error: 'std::size_t' has not been declared
   template<std::size_t _Len, std::size_t _Align =
                                   ^
In file included from /usr/include/c++/4.9/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/stl_pair.h:85:17: error: 'std::size_t' has not been declared
   template<std::size_t...>
                 ^
/usr/include/c++/4.9/bits/stl_pair.h:204:41: error: 'std::size_t' has not been declared
       template<typename... _Args1, std::size_t... _Indexes1,
                                         ^
/usr/include/c++/4.9/bits/stl_pair.h:205:41: error: 'std::size_t' has not been declared
                typename... _Args2, std::size_t... _Indexes2>
                                         ^
In file included from /usr/include/c++/4.9/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/stl_iterator_base_types.h:116:67: error: 'ptrdiff_t' does not name a type
   template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
                                                                   ^
/usr/include/c++/4.9/bits/stl_iterator_base_types.h:179:15: error: 'ptrdiff_t' does not name a type
       typedef ptrdiff_t                   difference_type;
               ^
/usr/include/c++/4.9/bits/stl_iterator_base_types.h:190:15: error: 'ptrdiff_t' does not name a type
       typedef ptrdiff_t                   difference_type;
               ^
In file included from /usr/include/c++/4.9/bits/stl_iterator.h:66:0,
                 from /usr/include/c++/4.9/bits/stl_algobase.h:67,
                 from /usr/include/c++/4.9/bits/char_traits.h:39,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/ptr_traits.h:69:15: error: 'ptrdiff_t' does not name a type
       typedef ptrdiff_t __type;
               ^
/usr/include/c++/4.9/bits/ptr_traits.h:157:15: error: 'ptrdiff_t' does not name a type
       typedef ptrdiff_t difference_type;
               ^
In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/stl_algobase.h: In static member function 'static _Tp* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const _Tp*, const _Tp*, _Tp*)':
/usr/include/c++/4.9/bits/stl_algobase.h:376:10: error: 'ptrdiff_t' does not name a type
    const ptrdiff_t _Num = __last - __first;
          ^
/usr/include/c++/4.9/bits/stl_algobase.h:377:8: error: '_Num' was not declared in this scope
    if (_Num)
        ^
/usr/include/c++/4.9/bits/stl_algobase.h:379:22: error: '_Num' was not declared in this scope
    return __result + _Num;
                      ^
/usr/include/c++/4.9/bits/stl_algobase.h: In static member function 'static _Tp* std::__copy_move_backward<_IsMove, true, std::random_access_iterator_tag>::__copy_move_b(const _Tp*, const _Tp*, _Tp*)':
/usr/include/c++/4.9/bits/stl_algobase.h:576:10: error: 'ptrdiff_t' does not name a type
    const ptrdiff_t _Num = __last - __first;
          ^
/usr/include/c++/4.9/bits/stl_algobase.h:577:8: error: '_Num' was not declared in this scope
    if (_Num)
        ^
/usr/include/c++/4.9/bits/stl_algobase.h:579:22: error: '_Num' was not declared in this scope
    return __result - _Num;
                      ^
In file included from /usr/include/c++/4.9/ios:40:0,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/char_traits.h: At global scope:
/usr/include/c++/4.9/bits/char_traits.h:104:66: error: 'std::size_t' has not been declared
       compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
                                                                  ^
/usr/include/c++/4.9/bits/char_traits.h:106:19: error: 'size_t' in namespace 'std' does not name a type
       static std::size_t
                   ^
/usr/include/c++/4.9/bits/char_traits.h:110:39: error: 'std::size_t' has not been declared
       find(const char_type* __s, std::size_t __n, const char_type& __a);
                                       ^
/usr/include/c++/4.9/bits/char_traits.h:113:57: error: 'std::size_t' has not been declared
       move(char_type* __s1, const char_type* __s2, std::size_t __n);
                                                         ^
/usr/include/c++/4.9/bits/char_traits.h:116:57: error: 'std::size_t' has not been declared
       copy(char_type* __s1, const char_type* __s2, std::size_t __n);
                                                         ^
/usr/include/c++/4.9/bits/char_traits.h:119:35: error: 'std::size_t' has not been declared
       assign(char_type* __s, std::size_t __n, char_type __a);
                                   ^
/usr/include/c++/4.9/bits/char_traits.h:145:64: error: 'std::size_t' has not been declared
     compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
                                                                ^
/usr/include/c++/4.9/bits/char_traits.h: In static member function 'static int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)':
/usr/include/c++/4.9/bits/char_traits.h:147:12: error: 'size_t' is not a member of 'std'
       for (std::size_t __i = 0; __i < __n; ++__i)
            ^
/usr/include/c++/4.9/bits/char_traits.h:147:12: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ios:40:0,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/char_traits.h:147:33: error: '__i' was not declared in this scope
       for (std::size_t __i = 0; __i < __n; ++__i)
                                 ^
/usr/include/c++/4.9/bits/char_traits.h: At global scope:
/usr/include/c++/4.9/bits/char_traits.h:156:10: error: 'size_t' in namespace 'std' does not name a type
     std::size_t
          ^
/usr/include/c++/4.9/bits/char_traits.h:169:37: error: 'std::size_t' has not been declared
     find(const char_type* __s, std::size_t __n, const char_type& __a)
                                     ^
/usr/include/c++/4.9/bits/char_traits.h: In static member function 'static const char_type* __gnu_cxx::char_traits<_CharT>::find(const char_type*, int, const char_type&)':
/usr/include/c++/4.9/bits/char_traits.h:171:12: error: 'size_t' is not a member of 'std'
       for (std::size_t __i = 0; __i < __n; ++__i)
            ^
/usr/include/c++/4.9/bits/char_traits.h:171:12: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ios:40:0,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/char_traits.h:171:33: error: '__i' was not declared in this scope
       for (std::size_t __i = 0; __i < __n; ++__i)
                                 ^
/usr/include/c++/4.9/bits/char_traits.h: At global scope:
/usr/include/c++/4.9/bits/char_traits.h:180:55: error: 'std::size_t' has not been declared
     move(char_type* __s1, const char_type* __s2, std::size_t __n)
                                                       ^
/usr/include/c++/4.9/bits/char_traits.h:189:55: error: 'std::size_t' has not been declared
     copy(char_type* __s1, const char_type* __s2, std::size_t __n)
                                                       ^
/usr/include/c++/4.9/bits/char_traits.h:199:33: error: 'std::size_t' has not been declared
     assign(char_type* __s, std::size_t __n, char_type __a)
                                 ^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/new:128:31: error: declaration of 'operator new' as non-function
 void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                               ^
/usr/include/c++/4.9/new:128:20: error: 'size_t' is not a member of 'std'
 void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                    ^
/usr/include/c++/4.9/new:128:20: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/new:130:33: error: declaration of 'operator new []' as non-function
 void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                                 ^
/usr/include/c++/4.9/new:130:22: error: 'size_t' is not a member of 'std'
 void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                      ^
/usr/include/c++/4.9/new:130:22: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/new:136:25: error: declaration of 'operator new' as non-function
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                         ^
/usr/include/c++/4.9/new:136:20: error: 'size_t' is not a member of 'std'
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                    ^
/usr/include/c++/4.9/new:136:20: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/new:136:33: error: expected primary-expression before 'const'
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                                 ^
/usr/include/c++/4.9/new:138:27: error: declaration of 'operator new []' as non-function
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                           ^
/usr/include/c++/4.9/new:138:22: error: 'size_t' is not a member of 'std'
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                      ^
/usr/include/c++/4.9/new:138:22: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/new:138:35: error: expected primary-expression before 'const'
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                                   ^
/usr/include/c++/4.9/new:146:32: error: declaration of 'operator new' as non-function
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                ^
/usr/include/c++/4.9/new:146:27: error: 'size_t' is not a member of 'std'
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                           ^
/usr/include/c++/4.9/new:146:27: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/new:146:40: error: expected primary-expression before 'void'
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                        ^
/usr/include/c++/4.9/new:148:34: error: declaration of 'operator new []' as non-function
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                  ^
/usr/include/c++/4.9/new:148:29: error: 'size_t' is not a member of 'std'
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                             ^
/usr/include/c++/4.9/new:148:29: note: suggested alternative:
In file included from /usr/include/wchar.h:51:0,
                 from /usr/include/c++/4.9/cwchar:44,
                 from /usr/include/c++/4.9/bits/postypes.h:40,
                 from /usr/include/c++/4.9/iosfwd:40,
                 from /usr/include/c++/4.9/ios:38,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/lib/gcc/i586-linux-gnu/4.9/include/stddef.h:212:23: note:   'size_t'
 typedef __SIZE_TYPE__ size_t;
                       ^
In file included from /usr/include/c++/4.9/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/new:148:42: error: expected primary-expression before 'void'
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                          ^
In file included from /usr/include/i386-linux-gnu/c++/4.9/bits/c++allocator.h:33:0,
                 from /usr/include/c++/4.9/bits/allocator.h:46,
                 from /usr/include/c++/4.9/string:41,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/new_allocator.h:44:14: error: 'std::size_t' has not been declared
   using std::size_t;
              ^
/usr/include/c++/4.9/ext/new_allocator.h:45:14: error: 'std::ptrdiff_t' has not been declared
   using std::ptrdiff_t;
              ^
/usr/include/c++/4.9/ext/new_allocator.h:62:15: error: 'ptrdiff_t' does not name a type
       typedef ptrdiff_t  difference_type;
               ^
In file included from /usr/include/c++/4.9/string:41:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/allocator.h:67:15: error: 'ptrdiff_t' does not name a type
       typedef ptrdiff_t   difference_type;
               ^
/usr/include/c++/4.9/bits/allocator.h:96:15: error: 'ptrdiff_t' does not name a type
       typedef ptrdiff_t  difference_type;
               ^
In file included from /usr/include/c++/4.9/string:44:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/ostream_insert.h:45:26: error: 'streamsize' has not been declared
       const _CharT* __s, streamsize __n)
                          ^
/usr/include/c++/4.9/bits/ostream_insert.h: In function 'void std::__ostream_write(std::basic_ostream<_CharT, _Traits>&, const _CharT*, int)':
/usr/include/c++/4.9/bits/ostream_insert.h:50:13: error: 'streamsize' does not name a type
       const streamsize __put = __out.rdbuf()->sputn(__s, __n);
             ^
/usr/include/c++/4.9/bits/ostream_insert.h:51:11: error: '__put' was not declared in this scope
       if (__put != __n)
           ^
/usr/include/c++/4.9/bits/ostream_insert.h: At global scope:
/usr/include/c++/4.9/bits/ostream_insert.h:57:59: error: 'streamsize' has not been declared
     __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
                                                           ^
/usr/include/c++/4.9/bits/ostream_insert.h:77:27: error: 'streamsize' has not been declared
        const _CharT* __s, streamsize __n)
                           ^
/usr/include/c++/4.9/bits/ostream_insert.h: In function 'std::basic_ostream<_CharT, _Traits>& std::__ostream_insert(std::basic_ostream<_CharT, _Traits>&, const _CharT*, int)':
/usr/include/c++/4.9/bits/ostream_insert.h:87:14: error: 'streamsize' does not name a type
        const streamsize __w = __out.width();
              ^
/usr/include/c++/4.9/bits/ostream_insert.h:88:12: error: '__w' was not declared in this scope
        if (__w > __n)
            ^
/usr/include/c++/4.9/bits/ostream_insert.h: At global scope:
/usr/include/c++/4.9/bits/ostream_insert.h:118:68: error: 'streamsize' has not been declared
   extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
                                                                    ^
/usr/include/c++/4.9/bits/ostream_insert.h:122:11: error: 'streamsize' has not been declared
           streamsize);
           ^
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:55:51: error: 'std::size_t' has not been declared
     const char* __name, const _CharT* __str, std::size_t* __idx,
                                                   ^
/usr/include/c++/4.9/ext/string_conversions.h:83:48: error: 'std::size_t' has not been declared
     __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*,
                                                ^
/usr/include/c++/4.9/ext/string_conversions.h:84:31: error: 'std::size_t' has not been declared
      __builtin_va_list), std::size_t __n,
                               ^
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h: In instantiation of 'class std::basic_string<char>':
/usr/include/c++/4.9/bits/basic_string.h:2859:68:   required from here
/usr/include/c++/4.9/bits/basic_string.h:122:61: error: no type named 'difference_type' in 'std::basic_string<char>::_CharT_alloc_type {aka class std::allocator<char>}'
       typedef typename _CharT_alloc_type::difference_type   difference_type;
                                                             ^
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h: In function 'int std::stoi(const string&, size_t*, int)':
/usr/include/c++/4.9/bits/basic_string.h:2860:19: error: no matching function for call to '__stoa(long int (*)(const char*, char**, int) throw (), const char [5], const char*, size_t*&, int&)'
      __idx, __base); }
                   ^
/usr/include/c++/4.9/bits/basic_string.h:2860:19: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2860:19: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
      __idx, __base); }
                   ^
/usr/include/c++/4.9/bits/basic_string.h: In function 'long int std::stol(const string&, size_t*, int)':
/usr/include/c++/4.9/bits/basic_string.h:2865:22: error: no matching function for call to '__stoa(long int (*)(const char*, char**, int) throw (), const char [5], const char*, size_t*&, int&)'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h:2865:22: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2865:22: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h: In function 'long unsigned int std::stoul(const string&, size_t*, int)':
/usr/include/c++/4.9/bits/basic_string.h:2870:22: error: no matching function for call to '__stoa(long unsigned int (*)(const char*, char**, int) throw (), const char [6], const char*, size_t*&, int&)'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h:2870:22: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2870:22: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h: In function 'long long int std::stoll(const string&, size_t*, int)':
/usr/include/c++/4.9/bits/basic_string.h:2875:22: error: no matching function for call to '__stoa(long long int (*)(const char*, char**, int) throw (), const char [6], const char*, size_t*&, int&)'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h:2875:22: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2875:22: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h: In function 'long long unsigned int std::stoull(const string&, size_t*, int)':
/usr/include/c++/4.9/bits/basic_string.h:2880:22: error: no matching function for call to '__stoa(long long unsigned int (*)(const char*, char**, int) throw (), const char [7], const char*, size_t*&, int&)'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h:2880:22: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2880:22: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
         __idx, __base); }
                      ^
/usr/include/c++/4.9/bits/basic_string.h: In function 'float std::stof(const string&, size_t*)':
/usr/include/c++/4.9/bits/basic_string.h:2885:72: error: no matching function for call to '__stoa(float (*)(const char*, char**) throw (), const char [5], const char*, size_t*&)'
   { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
                                                                        ^
/usr/include/c++/4.9/bits/basic_string.h:2885:72: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2885:72: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
   { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
                                                                        ^
/usr/include/c++/4.9/bits/basic_string.h: In function 'double std::stod(const string&, size_t*)':
/usr/include/c++/4.9/bits/basic_string.h:2889:72: error: no matching function for call to '__stoa(double (*)(const char*, char**) throw (), const char [5], const char*, size_t*&)'
   { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
                                                                        ^
/usr/include/c++/4.9/bits/basic_string.h:2889:72: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2889:72: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
   { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
                                                                        ^
/usr/include/c++/4.9/bits/basic_string.h: In function 'long double std::stold(const string&, size_t*)':
/usr/include/c++/4.9/bits/basic_string.h:2893:74: error: no matching function for call to '__stoa(long double (*)(const char*, char**) throw (), const char [6], const char*, size_t*&)'
   { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
                                                                          ^
/usr/include/c++/4.9/bits/basic_string.h:2893:74: note: candidate is:
In file included from /usr/include/c++/4.9/bits/basic_string.h:2850:0,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note: template<class _TRet, class _Ret, class _CharT, class ... _Base> _Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, int*, _Base ...)
     __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
     ^
/usr/include/c++/4.9/ext/string_conversions.h:54:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/4.9/string:52:0,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:2:
/usr/include/c++/4.9/bits/basic_string.h:2893:74: note:   cannot convert '__idx' (type 'size_t* {aka unsigned int*}') to type 'int*'
   { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(
stdout
Standard output is empty