Compile Error

/in/foo.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
In file included from /usr/include/c++/12/iosfwd:40,
                 from /usr/include/c++/12/iomanip:39,
                 from /in/foo.cc:2:
/usr/include/c++/12/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
   68 |   typedef ptrdiff_t     streamsize; // Signed integral type
      |           ^~~~~~~~~
/usr/include/c++/12/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
   40 | #include <cwchar> // For mbstate_t
  +++ |+#include <cstddef>
   41 | 
In file included from /usr/include/c++/12/bits/char_traits.h:42,
                 from /usr/include/c++/12/string:40,
                 from /usr/include/c++/12/bits/locale_classes.h:40,
                 from /usr/include/c++/12/bits/ios_base.h:41,
                 from /usr/include/c++/12/iomanip:40:
/usr/include/c++/12/type_traits:452:31: error: 'std::size_t' has not been declared
  452 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/12/type_traits:453:25: error: '_Size' was not declared in this scope
  453 |     struct is_array<_Tp[_Size]>
      |                         ^~~~~
/usr/include/c++/12/type_traits:453:31: error: template argument 1 is invalid
  453 |     struct is_array<_Tp[_Size]>
      |                               ^
/usr/include/c++/12/type_traits:558:42: error: 'nullptr_t' is not a member of 'std'
  558 |     struct __is_null_pointer_helper<std::nullptr_t>
      |                                          ^~~~~~~~~
/usr/include/c++/12/type_traits:558:42: error: 'nullptr_t' is not a member of 'std'
/usr/include/c++/12/type_traits:558:51: error: template argument 1 is invalid
  558 |     struct __is_null_pointer_helper<std::nullptr_t>
      |                                                   ^
/usr/include/c++/12/type_traits:1386:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1386 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                     ^~~~~~
In file included from /usr/include/wchar.h:35,
                 from /usr/include/c++/12/cwchar:44,
                 from /usr/include/c++/12/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1386:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1386 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1386:57: error: template argument 1 is invalid
 1386 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                                         ^
/usr/include/c++/12/type_traits:1386:57: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1395:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1395 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1395:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1395 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1395:46: error: template argument 1 is invalid
 1395 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/12/type_traits:1395:46: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1397:31: error: 'std::size_t' has not been declared
 1397 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/12/type_traits:1398:21: error: '_Size' was not declared in this scope
 1398 |     struct rank<_Tp[_Size]>
      |                     ^~~~~
/usr/include/c++/12/type_traits:1398:27: error: template argument 1 is invalid
 1398 |     struct rank<_Tp[_Size]>
      |                           ^
/usr/include/c++/12/type_traits:1399:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1399 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1399:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1399 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1399:65: error: template argument 1 is invalid
 1399 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/12/type_traits:1399:65: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1403:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1403 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1403:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1403 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1403:65: error: template argument 1 is invalid
 1403 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/12/type_traits:1403:65: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1408:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1408 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1408:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1408 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h:214:23: note: 'size_t' declared here
  214 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
/usr/include/c++/12/type_traits:1408:46: error: template argument 1 is invalid
 1408 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/12/type_traits:1408:46: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1410:47: error: 'std::size_t' has not been declared
 1410 |   template<typename _Tp, unsigned _Uint, std::size_t _Size>
      |                                               ^~~~~~
/usr/include/c++/12/type_traits:1411:23: error: '_Si

信息

递交者
类型
递交
题目
P2301 1.2.2:浮点型数据类型存储空间大小
语言
C++
递交时间
2025-03-08 13:04:48
评测时间
2025-03-08 13:04:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes