/ Vijos /

记录详情

Compile Error

foo.cpp:3:10: warning: ISO C99 requires whitespace after the macro name [enabled by default]
 #define N=10
          ^
foo.cpp:22:10: warning: ISO C99 requires whitespace after the macro name [enabled by default]
 #define N=11
          ^
foo.cpp:22:0: warning: "N" redefined [enabled by default]
 #define N=11
 ^
foo.cpp:3:0: note: this is the location of the previous definition
 #define N=10
 ^
foo.cpp:97:0: warning: "N" redefined [enabled by default]
 #define N 10
 ^
foo.cpp:22:0: note: this is the location of the previous definition
 #define N=11
 ^
foo.cpp:1:1: error: expected unqualified-id before numeric constant
 3.
 ^
In file included from foo.cpp:2:0:
c:\mingw\include\stdio.h:190:65: error: 'size_t' has not been declared
 _CRTIMP int __cdecl __MINGW_NOTHROW setvbuf (FILE*, char*, int, size_t);
                                                                 ^
c:\mingw\include\stdio.h:206:54: error: 'size_t' has not been declared
 extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
                                                      ^
c:\mingw\include\stdio.h:210:55: error: 'size_t' has not been declared
 extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VALIST);
                                                       ^
c:\mingw\include\stdio.h:318:55: error: 'size_t' has not been declared
 _CRTIMP int __cdecl __MINGW_NOTHROW _snprintf (char*, size_t, const char*, ...);
                                                       ^
c:\mingw\include\stdio.h:319:56: error: 'size_t' has not been declared
 _CRTIMP int __cdecl __MINGW_NOTHROW _vsnprintf (char*, size_t, const char*, __VALIST);
                                                        ^
c:\mingw\include\stdio.h:330:47: error: 'size_t' has not been declared
 int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
                                               ^
c:\mingw\include\stdio.h:331:48: error: 'size_t' has not been declared
 int __cdecl __MINGW_NOTHROW vsnprintf (char *, size_t, const char *, __VALIST);
                                                ^
c:\mingw\include\stdio.h:411:9: error: 'size_t' does not name a type
 _CRTIMP size_t __cdecl __MINGW_NOTHROW fread (void*, size_t, size_t, FILE*);
         ^
c:\mingw\include\stdio.h:412:9: error: 'size_t' does not name a type
 _CRTIMP size_t __cdecl __MINGW_NOTHROW fwrite (const void*, size_t, size_t, FILE*);
         ^
In file included from foo.cpp:2:0:
c:\mingw\include\stdio.h:630:59: error: 'size_t' has not been declared
 _CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
                                                           ^
c:\mingw\include\stdio.h:633:60: error: 'size_t' has not been declared
 _CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
                                                            ^
c:\mingw\include\stdio.h:670:52: error: 'size_t' has not been declared
 int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t*  format, ...);
                                                    ^
c:\mingw\include\stdio.h:671:53: error: 'size_t' has not been declared
 int __cdecl __MINGW_NOTHROW vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg);
                                                     ^
c:\mingw\include\stdio.h:674:25: error: 'size_t' has not been declared
 vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
                         ^
foo.cpp: In function 'int main()':
foo.cpp:3:10: error: expected primary-expression before '=' token
 #define N=10
          ^
foo.cpp:6:7: note: in expansion of macro 'N'
 int a[N];
       ^
foo.cpp:3:10: error: expected primary-expression before '=' token
 #define N=10
          ^
foo.cpp:8:11: note: in expansion of macro 'N'
 for(i=0;i<N;i++)
           ^
foo.cpp:9:13: error: 'a' was not declared in this scope
 scanf("%d",&a[i]);
             ^
foo.cpp:3:10: e

信息

递交者
类型
递交
题目
P1000 A+B Problem
语言
C++
递交时间
2016-10-28 15:06:19
评测时间
2016-10-28 15:06:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes