fork download
  1. TechFest.c
  2.  
  3. #include <stdio.h>
  4. #include <iostream>
  5. int main()
  6. {
  7. int t;
  8. int i;
  9. int j;
  10. int k=0;
  11. int tp;
  12.  
  13. int n;
  14. int m;
  15.  
  16. int costArray[20];
  17. int popArray[20];
  18. int finalArray[1000];
  19. int opString[20];
  20.  
  21. printf("Enter no.of test cases");
  22. scanf("%d", &t);
  23.  
  24. while(t<1 || t>10)
  25. {
  26. printf("Test cases needs to be b/w 1 and 10. Please enter again");
  27. scanf("%d", &t);
  28. }
  29.  
  30. for(i=1; i<=t; i++)
  31. {
  32. printf("reading values for test case :%d\n", i);
  33. printf("Enter no. of guests: ");
  34. scanf("%d", &n);
  35. while(n<1 || n>20)
  36. {
  37. printf("Guests should be greater than one and less than 20. Please enter again");
  38. scanf("%d", &n);
  39. }
  40.  
  41. printf("Enter Money in hand: ");
  42. scanf("%d", &m);
  43. while(0>m || m>20000)
  44. {
  45. printf("Money in hand cannot be -ve or greater than 20000. Please enter again");
  46. scanf("%d", &m);
  47. }
  48.  
  49. k=0;
  50.  
  51. for(j=0; j<n; j++)
  52. {
  53. printf("for guest %d\n", (j+1));
  54. printf("Enter cost: ");
  55. scanf("%d", &costArray[j]);
  56.  
  57. while(0 > costArray[j])
  58. {
  59. printf("Cost cannot be -ve. Please enter again");
  60. scanf("%d", &costArray[j]);
  61. }
  62.  
  63. printf("Enter popularity: ");
  64. scanf("%d", &popArray[j]);
  65.  
  66. while(popArray[j] > 1000)
  67. {
  68. printf("Popularity should be less than 1000. Please enter again");
  69. scanf("%d", &popArray[j]);
  70. }
  71. }
  72. for(j=0; j<n; j++)
  73. {
  74.  
  75. if(costArray[j] <= m)
  76. {
  77. finalArray[k++] = popArray[j];
  78. }
  79. for(tp=(j+1); tp<n; tp++)
  80. {
  81. if((costArray[j] + costArray[tp]) <= m)
  82. {
  83. printf("%d\n"+costArray[j] + costArray[tp]);
  84. printf("yes");
  85. finalArray[k++] = (popArray[j]+popArray[tp]);
  86. }
  87. }
  88. }
  89. for(tp=0; tp < k; tp++)
  90. {
  91. printf("%d--",finalArray[tp]);
  92. }
  93.  
  94. int max = k >0 ? finalArray[0] : 0;
  95.  
  96. for(tp=1; tp<k; tp++)
  97. {
  98. if(finalArray[tp] > max)
  99. {
  100. max = finalArray[tp];
  101. }
  102.  
  103. }
  104. opString[i] = max;
  105. }
  106.  
  107. printf("====OUTPUT===");
  108.  
  109. for(i=1; i<=t; i++)
  110. {
  111. printf("Maximum expected audience for usecase : %d = %d\n", i, opString[i]);
  112. }
  113.  
  114. return 0;
  115. }
  116.  
  117.  
  118.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:1: error: 'TechFest' does not name a type
 TechFest.c
 ^
In file included from /usr/include/c++/4.9/cwchar:44:0,
                 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:4:
/usr/include/wchar.h:106:9: error: '__mbstate_t' does not name a type
 typedef __mbstate_t mbstate_t;
         ^
/usr/include/wchar.h:151:38: error: 'size_t' has not been declared
     const wchar_t *__restrict __src, size_t __n)
                                      ^
/usr/include/wchar.h:159:38: error: 'size_t' has not been declared
     const wchar_t *__restrict __src, size_t __n)
                                      ^
/usr/include/wchar.h:166:63: error: 'size_t' has not been declared
 extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
                                                               ^
/usr/include/wchar.h:176:4: error: 'size_t' has not been declared
    size_t __n) __THROW;
    ^
In file included from /usr/include/c++/4.9/cwchar:44:0,
                 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:4:
/usr/include/wchar.h:186:6: error: 'size_t' has not been declared
      size_t __n, __locale_t __loc) __THROW;
      ^
/usr/include/wchar.h:196:8: error: 'size_t' does not name a type
 extern size_t wcsxfrm (wchar_t *__restrict __s1,
        ^
/usr/include/wchar.h:212:8: error: 'size_t' does not name a type
 extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
        ^
/usr/include/wchar.h:252:8: error: 'size_t' does not name a type
 extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject)
        ^
/usr/include/wchar.h:256:8: error: 'size_t' does not name a type
 extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept)
        ^
/usr/include/wchar.h:287:8: error: 'size_t' does not name a type
 extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;
        ^
/usr/include/wchar.h:306:8: error: 'size_t' does not name a type
 extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen)
        ^
/usr/include/wchar.h:314:59: error: 'size_t' has not been declared
 extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n)
                                                           ^
/usr/include/wchar.h:317:10: error: 'size_t' has not been declared
          size_t __n)
          ^
/usr/include/wchar.h:325:63: error: 'size_t' has not been declared
 extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
                                                               ^
/usr/include/wchar.h:330:37: error: 'size_t' has not been declared
     const wchar_t *__restrict __s2, size_t __n) __THROW;
                                     ^
/usr/include/wchar.h:334:63: error: 'size_t' has not been declared
 extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n)
                                                               ^
/usr/include/wchar.h:338:53: error: 'size_t' has not been declared
 extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW;
                                                     ^
/usr/include/wchar.h:345:38: error: 'size_t' has not been declared
      const wchar_t *__restrict __s2, size_t __n)
                                      ^
/usr/include/wchar.h:361:27: error: 'mbstate_t' does not name a type
 extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__;
                           ^
/usr/include/wchar.h:365:8: error: 'size_t' does not name a type
 extern size_t mbrtowc (wchar_t *__restrict __pwc,
        ^
/usr/include/wchar.h:370:8: error: 'size_t' does not name a type
 extern size_t wcrtomb (char *__restrict __s, wchar_t __wc,
        ^
/usr/include/wchar.h:374:8: error: 'size_t' does not name a type
 extern size_t __mbrlen (const char *__restrict __s, size_t __n,
        ^
/usr/include/wchar.h:376:8: error: 'size_t' does not name a type
 extern size_t mbrlen (const char *__restrict __s, size_t __n,
        ^
/usr/include/wchar.h:398:17: error: 'size_t' does not name a type
 __extern_inline size_t
                 ^
/usr/include/wchar.h:408:8: error: 'size_t' does not name a type
 extern size_t mbsrtowcs (wchar_t *__restrict __dst,
        ^
/usr/include/wchar.h:414:8: error: 'size_t' does not name a type
 extern size_t wcsrtombs (char *__restrict __dst,
        ^
/usr/include/wchar.h:423:8: error: 'size_t' does not name a type
 extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
        ^
/usr/include/wchar.h:429:8: error: 'size_t' does not name a type
 extern size_t wcsnrtombs (char *__restrict __dst,
        ^
/usr/include/wchar.h:443:42: error: 'size_t' has not been declared
 extern int wcswidth (const wchar_t *__s, size_t __n) __THROW;
                                          ^
/usr/include/wchar.h:572:38: error: 'size_t' has not been declared
     const wchar_t *__restrict __src, size_t __n)
                                      ^
/usr/include/wchar.h:580:8: error: '__FILE' does not name a type
 extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;
        ^
/usr/include/wchar.h:587:19: error: '__FILE' was not declared in this scope
 extern int fwide (__FILE *__fp, int __mode) __THROW;
                   ^
/usr/include/wchar.h:587:27: error: '__fp' was not declared in this scope
 extern int fwide (__FILE *__fp, int __mode) __THROW;
                           ^
/usr/include/wchar.h:587:33: error: expected primary-expression before 'int'
 extern int fwide (__FILE *__fp, int __mode) __THROW;
                                 ^
/usr/include/wchar.h:587:43: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int fwide (__FILE *__fp, int __mode) __THROW;
                                           ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/wchar.h:587:45: error: expected ',' or ';' before 'throw'
 extern int fwide (__FILE *__fp, int __mode) __THROW;
                                             ^
In file included from /usr/include/c++/4.9/cwchar:44:0,
                 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:4:
/usr/include/wchar.h:594:22: error: '__FILE' was not declared in this scope
 extern int fwprintf (__FILE *__restrict __stream,
                      ^
/usr/include/wchar.h:594:30: error: expected primary-expression before '__restrict'
 extern int fwprintf (__FILE *__restrict __stream,
                              ^
/usr/include/wchar.h:595:8: error: expected primary-expression before 'const'
        const wchar_t *__restrict __format, ...)
        ^
/usr/include/wchar.h:595:44: error: expected primary-expression before '...' token
        const wchar_t *__restrict __format, ...)
                                            ^
/usr/include/wchar.h:595:47: error: expression list treated as compound expression in initializer [-fpermissive]
        const wchar_t *__restrict __format, ...)
                                               ^
/usr/include/wchar.h:604:47: error: 'size_t' has not been declared
 extern int swprintf (wchar_t *__restrict __s, size_t __n,
                                               ^
/usr/include/wchar.h:612:23: error: '__FILE' was not declared in this scope
 extern int vfwprintf (__FILE *__restrict __s,
                       ^
/usr/include/wchar.h:612:31: error: expected primary-expression before '__restrict'
 extern int vfwprintf (__FILE *__restrict __s,
                               ^
/usr/include/wchar.h:613:9: error: expected primary-expression before 'const'
         const wchar_t *__restrict __format,
         ^
/usr/include/wchar.h:614:9: error: '__gnuc_va_list' was not declared in this scope
         __gnuc_va_list __arg)
         ^
/usr/include/wchar.h:614:29: error: expression list treated as compound expression in initializer [-fpermissive]
         __gnuc_va_list __arg)
                             ^
/usr/include/wchar.h:621:8: error: '__gnuc_va_list' has not been declared
        __gnuc_va_list __arg)
        ^
/usr/include/wchar.h:625:48: error: 'size_t' has not been declared
 extern int vswprintf (wchar_t *__restrict __s, size_t __n,
                                                ^
/usr/include/wchar.h:627:9: error: '__gnuc_va_list' has not been declared
         __gnuc_va_list __arg)
         ^
/usr/include/wchar.h:635:21: error: '__FILE' was not declared in this scope
 extern int fwscanf (__FILE *__restrict __stream,
                     ^
/usr/include/wchar.h:635:29: error: expected primary-expression before '__restrict'
 extern int fwscanf (__FILE *__restrict __stream,
                             ^
/usr/include/wchar.h:636:7: error: expected primary-expression before 'const'
       const wchar_t *__restrict __format, ...)
       ^
/usr/include/wchar.h:636:43: error: expected primary-expression before '...' token
       const wchar_t *__restrict __format, ...)
                                           ^
/usr/include/wchar.h:636:46: error: expression list treated as compound expression in initializer [-fpermissive]
       const wchar_t *__restrict __format, ...)
                                              ^
/usr/include/wchar.h:689:22: error: '__FILE' was not declared in this scope
 extern int vfwscanf (__FILE *__restrict __s,
                      ^
/usr/include/wchar.h:689:30: error: expected primary-expression before '__restrict'
 extern int vfwscanf (__FILE *__restrict __s,
                              ^
/usr/include/wchar.h:690:8: error: expected primary-expression before 'const'
        const wchar_t *__restrict __format,
        ^
/usr/include/wchar.h:691:8: error: '__gnuc_va_list' was not declared in this scope
        __gnuc_va_list __arg)
        ^
/usr/include/wchar.h:691:28: error: expression list treated as compound expression in initializer [-fpermissive]
        __gnuc_va_list __arg)
                            ^
/usr/include/wchar.h:698:7: error: '__gnuc_va_list' has not been declared
       __gnuc_va_list __arg)
       ^
/usr/include/wchar.h:703:8: error: '__gnuc_va_list' has not been declared
        __gnuc_va_list __arg)
        ^
/usr/include/wchar.h:745:23: error: '__FILE' was not declared in this scope
 extern wint_t fgetwc (__FILE *__stream);
                       ^
/usr/include/wchar.h:745:31: error: '__stream' was not declared in this scope
 extern wint_t fgetwc (__FILE *__stream);
                               ^
/usr/include/wchar.h:746:22: error: '__FILE' was not declared in this scope
 extern wint_t getwc (__FILE *__stream);
                      ^
/usr/include/wchar.h:746:30: error: '__stream' was not declared in this scope
 extern wint_t getwc (__FILE *__stream);
                              ^
/usr/include/wchar.h:759:37: error: '__FILE' has not been declared
 extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
                                     ^
/usr/include/wchar.h:760:36: error: '__FILE' has not been declared
 extern wint_t putwc (wchar_t __wc, __FILE *__stream);
                                    ^
/usr/include/wchar.h:775:4: error: '__FILE' has not been declared
    __FILE *__restrict __stream);
    ^
/usr/include/wchar.h:782:6: error: '__FILE' has not been declared
      __FILE *__restrict __stream);
      ^
/usr/include/wchar.h:789:37: error: '__FILE' has not been declared
 extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
                                     ^
/usr/include/wchar.h:801:31: error: '__FILE' was not declared in this scope
 extern wint_t getwc_unlocked (__FILE *__stream);
                               ^
/usr/include/wchar.h:801:39: error: '__stream' was not declared in this scope
 extern wint_t getwc_unlocked (__FILE *__stream);
                                       ^
/usr/include/wchar.h:810:32: error: '__FILE' was not declared in this scope
 extern wint_t fgetwc_unlocked (__FILE *__stream);
                                ^
/usr/include/wchar.h:810:40: error: '__stream' was not declared in this scope
 extern wint_t fgetwc_unlocked (__FILE *__stream);
                                        ^
/usr/include/wchar.h:818:46: error: '__FILE' has not been declared
 extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
                                              ^
/usr/include/wchar.h:827:45: error: '__FILE' has not been declared
 extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
                                             ^
/usr/include/wchar.h:838:6: error: '__FILE' has not been declared
      __FILE *__restrict __stream);
      ^
/usr/include/wchar.h:847:8: error: '__FILE' has not been declared
        __FILE *__restrict __stream);
        ^
/usr/include/wchar.h:855:8: error: 'size_t' does not name a type
 extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
        ^
/usr/include/wchar.h:865:8: error: 'size_t' does not name a type
 extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
        ^
In file included from /usr/include/c++/4.9/bits/postypes.h:40:0,
                 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:4:
/usr/include/c++/4.9/cwchar:64:11: error: '::mbstate_t' has not been declared
   using ::mbstate_t;
           ^
/usr/include/c++/4.9/cwchar:151:11: error: '::mbrlen' has not been declared
   using ::mbrlen;
           ^
/usr/include/c++/4.9/cwchar:152:11: error: '::mbrtowc' has not been declared
   using ::mbrtowc;
           ^
/usr/include/c++/4.9/cwchar:154:11: error: '::mbsrtowcs' has not been declared
   using ::mbsrtowcs;
           ^
/usr/include/c++/4.9/cwchar:176:11: error: '::wcrtomb' has not been declared
   using ::wcrtomb;
           ^
/usr/include/c++/4.9/cwchar:181:11: error: '::wcscspn' has not been declared
   using ::wcscspn;
           ^
/usr/include/c++/4.9/cwchar:182:11: error: '::wcsftime' has not been declared
   using ::wcsftime;
           ^
/usr/include/c++/4.9/cwchar:183:11: error: '::wcslen' has not been declared
   using ::wcslen;
           ^
/usr/include/c++/4.9/cwchar:187:11: error: '::wcsrtombs' has not been declared
   using ::wcsrtombs;
           ^
/usr/include/c++/4.9/cwchar:188:11: error: '::wcsspn' has not been declared
   using ::wcsspn;
           ^
/usr/include/c++/4.9/cwchar:196:11: error: '::wcsxfrm' has not been declared
   using ::wcsxfrm;
           ^
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:4:
/usr/include/c++/4.9/bits/postypes.h:228:16: error: 'mbstate_t' was not declared in this scope
   typedef fpos<mbstate_t> streampos;
                ^
/usr/include/c++/4.9/bits/postypes.h:228:25: error: template argument 1 is invalid
   typedef fpos<mbstate_t> streampos;
                         ^
/usr/include/c++/4.9/bits/postypes.h:228:36: error: invalid type in declaration before ';' token
   typedef fpos<mbstate_t> streampos;
                                    ^
/usr/include/c++/4.9/bits/postypes.h:230:16: error: 'mbstate_t' was not declared in this scope
   typedef fpos<mbstate_t> wstreampos;
                ^
/usr/include/c++/4.9/bits/postypes.h:230:25: error: template argument 1 is invalid
   typedef fpos<mbstate_t> wstreampos;
                         ^
/usr/include/c++/4.9/bits/postypes.h:230:37: error: invalid type in declaration before ';' token
   typedef fpos<mbstate_t> wstreampos;
                                     ^
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:4:
/usr/include/c++/4.9/bits/char_traits.h:63:20: error: 'mbstate_t' in namespace 'std' does not name a type
       typedef std::mbstate_t  state_type;
                    ^
/usr/include/c++/4.9/bits/char_traits.h:239:15: error: 'mbstate_t' does not name a type
       typedef mbstate_t         state_type;
               ^
/usr/include/c++/4.9/bits/char_traits.h:314:15: error: 'mbstate_t' does not name a type
       typedef mbstate_t         state_type;
               ^
/usr/include/c++/4.9/bits/char_traits.h: In static member function 'static std::size_t std::char_traits<wchar_t>::length(const char_type*)':
/usr/include/c++/4.9/bits/char_traits.h:334:26: error: 'wcslen' was not declared in this scope
       { return wcslen(__s); }
                          ^
In file included from /usr/include/endian.h:60:0,
                 from /usr/include/ctype.h:39,
                 from /usr/include/c++/4.9/cctype:42,
                 from /usr/include/c++/4.9/bits/localefwd.h:42,
                 from /usr/include/c++/4.9/ios:41,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:4:
/usr/include/i386-linux-gnu/bits/byteswap.h: At global scope:
/usr/include/i386-linux-gnu/bits/byteswap.h:108:17: error: '__uint64_t' does not name a type
 static __inline __uint64_t
                 ^
In file included from /usr/include/c++/4.9/cctype:42:0,
                 from /usr/include/c++/4.9/bits/localefwd.h:42,
                 from /usr/include/c++/4.9/ios:41,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:4:
/usr/include/ctype.h:81:14: error: '__int32_t' does not name a type
 extern const __int32_t **__ctype_tolower_loc (void)
              ^
/usr/include/ctype.h:83:14: error: '__int32_t' does not name a type
 extern const __int32_t **__ctype_toupper_loc (void)
              ^
In file included from /usr/include/c++/4.9/ios:41:0,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:4:
/usr/include/c++/4.9/bits/localefwd.h:133:40: error: 'mbstate_t' was not declared in this scope
   template<> class codecvt<char, char, mbstate_t>;
                                        ^
/usr/include/c++/4.9/bits/localefwd.h:133:49: error: template argument 3 is invalid
   template<> class codecvt<char, char, mbstate_t>;
                                                 ^
/usr/include/c++/4.9/bits/localefwd.h:135:43: error: 'mbstate_t' was not declared in this scope
   template<> class codecvt<wchar_t, char, mbstate_t>;
                                           ^
/usr/include/c++/4.9/bits/localefwd.h:135:52: error: template argument 3 is invalid
   template<> class codecvt<wchar_t, char, mbstate_t>;
                                                    ^
In file included from /usr/include/sched.h:32:0,
                 from /usr/include/pthread.h:23,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:75:9: error: '__time_t' does not name a type
 typedef __time_t time_t;
         ^
/usr/include/time.h:122:5: error: '__time_t' does not name a type
     __time_t tv_sec;  /* Seconds.  */
     ^
/usr/include/time.h:123:5: error: '__syscall_slong_t' does not name a type
     __syscall_slong_t tv_nsec; /* Nanoseconds.  */
     ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:35:9: error: '__pid_t' does not name a type
 typedef __pid_t pid_t;
         ^
In file included from /usr/include/sched.h:41:0,
                 from /usr/include/pthread.h:23,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/i386-linux-gnu/bits/sched.h:203:30: error: 'size_t' was not declared in this scope
 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
                              ^
/usr/include/i386-linux-gnu/bits/sched.h:203:30: note: suggested alternative:
In file included from /usr/include/c++/4.9/iostream:38:0,
                 from prog.cpp:4:
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:188:26: note:   'std::size_t'
   typedef __SIZE_TYPE__  size_t;
                          ^
In file included from /usr/include/sched.h:41:0,
                 from /usr/include/pthread.h:23,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/i386-linux-gnu/bits/sched.h:203:48: error: expected primary-expression before 'const'
 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
                                                ^
/usr/include/i386-linux-gnu/bits/sched.h:203:71: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
                                                                       ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/i386-linux-gnu/bits/sched.h:204:3: error: expected ',' or ';' before 'throw'
   __THROW;
   ^
In file included from /usr/include/sched.h:41:0,
                 from /usr/include/pthread.h:23,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/i386-linux-gnu/bits/sched.h:205:37: error: 'size_t' was not declared in this scope
 extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
                                     ^
/usr/include/i386-linux-gnu/bits/sched.h:205:37: note: suggested alternative:
In file included from /usr/include/c++/4.9/iostream:38:0,
                 from prog.cpp:4:
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:188:26: note:   'std::size_t'
   typedef __SIZE_TYPE__  size_t;
                          ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/i386-linux-gnu/bits/sched.h:205:53: error: expected ',' or ';' before 'throw'
 extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
                                                     ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:49:28: error: '__pid_t' was not declared in this scope
 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                            ^
/usr/include/sched.h:49:43: error: expected primary-expression before 'const'
 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                           ^
/usr/include/sched.h:49:76: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
                                                                            ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/sched.h:50:6: error: expected ',' or ';' before 'throw'
      __THROW;
      ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:53:28: error: '__pid_t' was not declared in this scope
 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                            ^
/usr/include/sched.h:53:43: error: expected primary-expression before 'struct'
 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                           ^
/usr/include/sched.h:53:70: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/sched.h:53:72: error: expected ',' or ';' before 'throw'
 extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW;
                                                                        ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:56:32: error: '__pid_t' was not declared in this scope
 extern int sched_setscheduler (__pid_t __pid, int __policy,
                                ^
/usr/include/sched.h:56:47: error: expected primary-expression before 'int'
 extern int sched_setscheduler (__pid_t __pid, int __policy,
                                               ^
/usr/include/sched.h:57:11: error: expected primary-expression before 'const'
           const struct sched_param *__param) __THROW;
           ^
/usr/include/sched.h:57:44: error: expression list treated as compound expression in initializer [-fpermissive]
           const struct sched_param *__param) __THROW;
                                            ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/sched.h:57:46: error: expected ',' or ';' before 'throw'
           const struct sched_param *__param) __THROW;
                                              ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:60:32: error: '__pid_t' was not declared in this scope
 extern int sched_getscheduler (__pid_t __pid) __THROW;
                                ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/sched.h:60:47: error: expected ',' or ';' before 'throw'
 extern int sched_getscheduler (__pid_t __pid) __THROW;
                                               ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:72:35: error: '__pid_t' was not declared in this scope
 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                   ^
/usr/include/sched.h:72:50: error: expected primary-expression before 'struct'
 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                  ^
/usr/include/sched.h:72:70: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/sched.h:72:72: error: expected ',' or ';' before 'throw'
 extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
                                                                        ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:116:31: error: '__pid_t' was not declared in this scope
 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
                               ^
/usr/include/sched.h:116:46: error: 'size_t' was not declared in this scope
 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
                                              ^
/usr/include/sched.h:116:46: note: suggested alternative:
In file included from /usr/include/c++/4.9/iostream:38:0,
                 from prog.cpp:4:
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:188:26: note:   'std::size_t'
   typedef __SIZE_TYPE__  size_t;
                          ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:117:10: error: expected primary-expression before 'const'
          const cpu_set_t *__cpuset) __THROW;
          ^
/usr/include/sched.h:117:35: error: expression list treated as compound expression in initializer [-fpermissive]
          const cpu_set_t *__cpuset) __THROW;
                                   ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/sched.h:117:37: error: expected ',' or ';' before 'throw'
          const cpu_set_t *__cpuset) __THROW;
                                     ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:120:31: error: '__pid_t' was not declared in this scope
 extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
                               ^
/usr/include/sched.h:120:46: error: 'size_t' was not declared in this scope
 extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
                                              ^
/usr/include/sched.h:120:46: note: suggested alternative:
In file included from /usr/include/c++/4.9/iostream:38:0,
                 from prog.cpp:4:
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:188:26: note:   'std::size_t'
   typedef __SIZE_TYPE__  size_t;
                          ^
In file included from /usr/include/pthread.h:23:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/sched.h:121:20: error: expected primary-expression before '*' token
          cpu_set_t *__cpuset) __THROW;
                    ^
/usr/include/sched.h:121:21: error: '__cpuset' was not declared in this scope
          cpu_set_t *__cpuset) __THROW;
                     ^
/usr/include/sched.h:121:29: error: expression list treated as compound expression in initializer [-fpermissive]
          cpu_set_t *__cpuset) __THROW;
                             ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/sched.h:121:31: error: expected ',' or ';' before 'throw'
          cpu_set_t *__cpuset) __THROW;
                               ^
In file included from /usr/include/time.h:41:0,
                 from /usr/include/pthread.h:24,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/i386-linux-gnu/bits/time.h:32:5: error: '__time_t' does not name a type
     __time_t tv_sec;  /* Seconds.  */
     ^
/usr/include/i386-linux-gnu/bits/time.h:33:5: error: '__suseconds_t' does not name a type
     __suseconds_t tv_usec; /* Microseconds.  */
     ^
In file included from /usr/include/i386-linux-gnu/bits/time.h:86:0,
                 from /usr/include/time.h:41,
                 from /usr/include/pthread.h:24,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/i386-linux-gnu/bits/timex.h:28:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t offset; /* time offset (usec) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:29:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t freq; /* frequency offset (scaled ppm) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:30:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t maxerror; /* maximum error (usec) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:31:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t esterror; /* estimated error (usec) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:33:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t constant; /* pll time constant */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:34:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t precision; /* clock precision (usec) (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:35:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:37:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t tick; /* (modified) usecs between clock ticks */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:38:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:39:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t jitter; /* pps jitter (us) (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:41:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t stabil; /* pps stability (scaled ppm) (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:42:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t jitcnt; /* jitter limit exceeded (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:43:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t calcnt; /* calibration intervals (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:44:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t errcnt; /* calibration errors (ro) */
   ^
/usr/include/i386-linux-gnu/bits/timex.h:45:3: error: '__syscall_slong_t' does not name a type
   __syscall_slong_t stbcnt; /* stability limit exceeded (ro) */
   ^
In file included from /usr/include/time.h:41:0,
                 from /usr/include/pthread.h:24,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/i386-linux-gnu/bits/time.h:91:27: error: '__clockid_t' was not declared in this scope
 extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                           ^
/usr/include/i386-linux-gnu/bits/time.h:91:51: error: expected primary-expression before 'struct'
 extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                   ^
/usr/include/i386-linux-gnu/bits/time.h:91:70: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/i386-linux-gnu/bits/time.h:91:72: error: expected ',' or ';' before 'throw'
 extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
                                                                        ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:59:9: error: '__clock_t' does not name a type
 typedef __clock_t clock_t;
         ^
/usr/include/time.h:91:9: error: '__clockid_t' does not name a type
 typedef __clockid_t clockid_t;
         ^
/usr/include/time.h:103:9: error: '__timer_t' does not name a type
 typedef __timer_t timer_t;
         ^
/usr/include/time.h:189:8: error: 'clock_t' does not name a type
 extern clock_t clock (void) __THROW;
        ^
/usr/include/time.h:192:8: error: 'time_t' does not name a type
 extern time_t time (time_t *__timer) __THROW;
        ^
/usr/include/time.h:195:25: error: 'time_t' was not declared in this scope
 extern double difftime (time_t __time1, time_t __time0)
                         ^
/usr/include/time.h:195:41: error: 'time_t' was not declared in this scope
 extern double difftime (time_t __time1, time_t __time0)
                                         ^
/usr/include/time.h:195:55: error: expression list treated as compound expression in initializer [-fpermissive]
 extern double difftime (time_t __time1, time_t __time0)
                                                       ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:196:6: error: expected ',' or ';' before 'throw'
      __THROW __attribute__ ((__const__));
      ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:199:8: error: 'time_t' does not name a type
 extern time_t mktime (struct tm *__tp) __THROW;
        ^
/usr/include/time.h:205:8: error: 'size_t' does not name a type
 extern size_t strftime (char *__restrict __s, size_t __maxsize,
        ^
/usr/include/time.h:223:8: error: 'size_t' does not name a type
 extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
        ^
/usr/include/time.h:239:33: error: 'time_t' does not name a type
 extern struct tm *gmtime (const time_t *__timer) __THROW;
                                 ^
/usr/include/time.h:243:36: error: 'time_t' does not name a type
 extern struct tm *localtime (const time_t *__timer) __THROW;
                                    ^
/usr/include/time.h:249:35: error: 'time_t' does not name a type
 extern struct tm *gmtime_r (const time_t *__restrict __timer,
                                   ^
/usr/include/time.h:254:38: error: 'time_t' does not name a type
 extern struct tm *localtime_r (const time_t *__restrict __timer,
                                      ^
/usr/include/time.h:264:27: error: 'time_t' does not name a type
 extern char *ctime (const time_t *__timer) __THROW;
                           ^
/usr/include/time.h:276:29: error: 'time_t' does not name a type
 extern char *ctime_r (const time_t *__restrict __timer,
                             ^
/usr/include/time.h:304:25: error: 'time_t' does not name a type
 extern int stime (const time_t *__when) __THROW;
                         ^
/usr/include/time.h:319:8: error: 'time_t' does not name a type
 extern time_t timegm (struct tm *__tp) __THROW;
        ^
/usr/include/time.h:322:8: error: 'time_t' does not name a type
 extern time_t timelocal (struct tm *__tp) __THROW;
        ^
/usr/include/time.h:339:26: error: 'clockid_t' was not declared in this scope
 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
                          ^
/usr/include/time.h:339:48: error: expected primary-expression before 'struct'
 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
                                                ^
/usr/include/time.h:339:70: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
                                                                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:339:72: error: expected ',' or ';' before 'throw'
 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
                                                                        ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:342:27: error: 'clockid_t' was not declared in this scope
 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
                           ^
/usr/include/time.h:342:49: error: expected primary-expression before 'struct'
 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
                                                 ^
/usr/include/time.h:342:70: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
                                                                      ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:342:72: error: expected ',' or ';' before 'throw'
 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
                                                                        ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:345:27: error: 'clockid_t' was not declared in this scope
 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
                           ^
/usr/include/time.h:345:49: error: expected primary-expression before 'const'
 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
                                                 ^
/usr/include/time.h:345:76: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
                                                                            ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:346:6: error: expected ',' or ';' before 'throw'
      __THROW;
      ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:353:29: error: 'clockid_t' was not declared in this scope
 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
                             ^
/usr/include/time.h:353:51: error: expected primary-expression before 'int'
 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
                                                   ^
/usr/include/time.h:354:8: error: expected primary-expression before 'const'
        const struct timespec *__req,
        ^
/usr/include/time.h:355:8: error: expected primary-expression before 'struct'
        struct timespec *__rem);
        ^
/usr/include/time.h:355:30: error: expression list treated as compound expression in initializer [-fpermissive]
        struct timespec *__rem);
                              ^
/usr/include/time.h:358:33: error: 'pid_t' was not declared in this scope
 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
                                 ^
/usr/include/time.h:358:46: error: 'clockid_t' was not declared in this scope
 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
                                              ^
/usr/include/time.h:358:57: error: '__clock_id' was not declared in this scope
 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
                                                         ^
/usr/include/time.h:358:67: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
                                                                   ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:358:69: error: expected ',' or ';' before 'throw'
 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
                                                                     ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:363:26: error: 'clockid_t' was not declared in this scope
 extern int timer_create (clockid_t __clock_id,
                          ^
/usr/include/time.h:364:5: error: expected primary-expression before 'struct'
     struct sigevent *__restrict __evp,
     ^
/usr/include/time.h:365:5: error: 'timer_t' was not declared in this scope
     timer_t *__restrict __timerid) __THROW;
     ^
/usr/include/time.h:365:14: error: expected primary-expression before '__restrict'
     timer_t *__restrict __timerid) __THROW;
              ^
/usr/include/time.h:365:34: error: expression list treated as compound expression in initializer [-fpermissive]
     timer_t *__restrict __timerid) __THROW;
                                  ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:365:36: error: expected ',' or ';' before 'throw'
     timer_t *__restrict __timerid) __THROW;
                                    ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:368:26: error: 'timer_t' was not declared in this scope
 extern int timer_delete (timer_t __timerid) __THROW;
                          ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:368:45: error: expected ',' or ';' before 'throw'
 extern int timer_delete (timer_t __timerid) __THROW;
                                             ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:371:27: error: 'timer_t' was not declared in this scope
 extern int timer_settime (timer_t __timerid, int __flags,
                           ^
/usr/include/time.h:371:46: error: expected primary-expression before 'int'
 extern int timer_settime (timer_t __timerid, int __flags,
                                              ^
/usr/include/time.h:372:6: error: expected primary-expression before 'const'
      const struct itimerspec *__restrict __value,
      ^
/usr/include/time.h:373:6: error: expected primary-expression before 'struct'
      struct itimerspec *__restrict __ovalue) __THROW;
      ^
/usr/include/time.h:373:44: error: expression list treated as compound expression in initializer [-fpermissive]
      struct itimerspec *__restrict __ovalue) __THROW;
                                            ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:373:46: error: expected ',' or ';' before 'throw'
      struct itimerspec *__restrict __ovalue) __THROW;
                                              ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:376:27: error: 'timer_t' was not declared in this scope
 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
                           ^
/usr/include/time.h:376:46: error: expected primary-expression before 'struct'
 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
                                              ^
/usr/include/time.h:376:72: error: expression list treated as compound expression in initializer [-fpermissive]
 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
                                                                        ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:377:6: error: expected ',' or ';' before 'throw'
      __THROW;
      ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/time.h:380:30: error: 'timer_t' was not declared in this scope
 extern int timer_getoverrun (timer_t __timerid) __THROW;
                              ^
In file included from /usr/include/features.h:374:0,
                 from /usr/include/stdio.h:27,
                 from prog.cpp:3:
/usr/include/time.h:380:49: error: expected ',' or ';' before 'throw'
 extern int timer_getoverrun (timer_t __timerid) __THROW;
                                                 ^
In file included from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr-default.h:35:0,
                 from /usr/include/i386-linux-gnu/c++/4.9/bits/gthr.h:148,
                 from /usr/include/c++/4.9/ext/atomicity.h:35,
                 from /usr/include/c++/4.9/bits/ios_base.h:39,
                 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:4:
/usr/include/pthread.h:317:11: error: 'size_t' has not been declared
           size_t *__guardsize)
           ^
/usr/include/pthread.h:322:11: error: 'size_t' has not been declared
           size_t __guardsize)
           ^
/usr/include/pthread.h:380:19: error: 'size_t' has not been declared
           __attr, size_t *__restrict __stacksize)
                   ^
/usr/include/pthread.h:387:11: error: 'size_t' has not been declared
           size_t __stacksize)
           ^
/usr/include/pthread.h:394:7: error: 'size_t' has not been declared
       size_t *__restrict __stacksize)
       ^
/usr/include/pthread.h:401:7: error: 'size_t' has not been declared
       size_t __stacksize) __THROW __nonnull ((1));
       ^
/usr/include/pthread.h:408:6: error: 'size_t' has not been declared
      size_t __cpusetsize,
      ^
/usr/include/pthread.h:415:6: error: 'size_t' has not been declared
      size_t __cpusetsize,
      ^
/usr/include/pthread.h:458:11: error: 'size_t' has not been declared
           size_t __buflen)
           ^
/usr/include/pthread.h:485:52: error: 'size_t' has not been declared
 extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
                                                    ^
/usr/include/pthread.h:490:52: error: 'size_t' has not been declared
 extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
                                                    ^
/usr/include/pthread.h:1040:11: error: '__clockid_t' has not been declared
           __clockid_t *__restrict __clock_id)
           ^
/usr/include/pthread.h:1045:11: error: '__clockid_t' has not been declared
           __clockid_t __clock_id)
           ^
/usr/include/pthread.h:1140:7: error: '__clockid_t' has not been declared
       __clockid_t *__clock_id)
       ^
In file included from /usr/include/c++/4.9/cwctype:50:0,
                 from /usr/include/c++/4.9/bits/locale_facets.h:39,
                 from /usr/include/c++/4.9/bits/basic_ios.h:37,
                 from /usr/include/c++/4.9/ios:44,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:4:
/usr/include/wctype.h:186:15: error: '__int32_t' does not name a type
 typedef const __int32_t *wctrans_t;
               ^
/usr/include/wctype.h:218:8: error: 'wctrans_t' does not name a type
 extern wctrans_t wctrans (const char *__property) __THROW;
        ^
/usr/include/wctype.h:221:39: error: 'wctrans_t' has not been declared
 extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __THROW;
                                       ^
/usr/include/wctype.h:305:8: error: 'wctrans_t' does not name a type
 extern wctrans_t wctrans_l (const char *__property, __locale_t __locale)
        ^
/usr/include/wctype.h:309:41: error: 'wctrans_t' has not been declared
 extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc,
                                         ^
In file included from /usr/include/c++/4.9/bits/locale_facets.h:39:0,
                 from /usr/include/c++/4.9/bits/basic_ios.h:37,
                 from /usr/include/c++/4.9/ios:44,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:4:
/usr/include/c++/4.9/cwctype:82:11: error: '::wctrans_t' has not been declared
   using ::wctrans_t;
           ^
/usr/include/c++/4.9/cwctype:104:11: error: '::wctrans' has not been declared
   using ::wctrans;
           ^
prog.cpp: In function 'int main()':
prog.cpp:21:35: error: 'printf' was not declared in this scope
    printf("Enter no.of test cases");
                                   ^
prog.cpp:22:18: error: 'scanf' was not declared in this scope
    scanf("%d", &t);
                  ^
stdout
Standard output is empty