F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_16938349_21898.c:1:1: error: expected identifier or '(' before '/' token
 // HDOJ.cpp : Defines the entry point for the console application.
 ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/_mingw.h:282:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/crtdefs.h:10,
                 from GCC4.9.2/x86_64-w64-mingw32/include/stdio.h:9,
                 from 0_0_16938349_21898.c:4:
GCC4.9.2/x86_64-w64-mingw32/include/vadefs.h:29:11: error: unknown type name '__gnuc_va_list'
   typedef __gnuc_va_list va_list;
           ^
0_0_16938349_21898.c: In function 'GetMaxValue':
0_0_16938349_21898.c:17:12: error: 'new' undeclared (first use in this function)
  int** p = new int*[bagVolume + 1];
            ^
0_0_16938349_21898.c:17:12: note: each undeclared identifier is reported only once for each function it appears in
0_0_16938349_21898.c:17:16: error: expected ',' or ';' before 'int'
  int** p = new int*[bagVolume + 1];
                ^
0_0_16938349_21898.c:18:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i <= bagVolume; i++)
  ^
0_0_16938349_21898.c:18:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_16938349_21898.c:20:14: error: expected ';' before 'int'
   p[i] = new int[N];
              ^
0_0_16938349_21898.c:22:11: error: redefinition of 'i'
  for (int i = 0; i<N; i++)
           ^
0_0_16938349_21898.c:18:11: note: previous definition of 'i' was here
  for (int i = 0; i <= bagVolume; i++)
           ^
0_0_16938349_21898.c:22:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i<N; i++)
  ^
0_0_16938349_21898.c:27:11: error: redefinition of 'i'
  for (int i = 1; i <= bagVolume; i++)
           ^
0_0_16938349_21898.c:22:11: note: previous definition of 'i' was here
  for (int i = 0; i<N; i++)
           ^
0_0_16938349_21898.c:27:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 1; i <= bagVolume; i++)
  ^
0_0_16938349_21898.c:29:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = 0; j<N; j++)
   ^
0_0_16938349_21898.c: In function 'main':
0_0_16938349_21898.c:48:14: error: 'new' undeclared (first use in this function)
   int *value=new int[N];
              ^
0_0_16938349_21898.c:48:18: error: expected ',' or ';' before 'int'
   int *value=new int[N];
                  ^
0_0_16938349_21898.c:49:21: error: expected ',' or ';' before 'int'
   int *volume = new int[N];
                     ^
0_0_16938349_21898.c:50:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < N; i++)
   ^
0_0_16938349_21898.c:54:12: error: redefinition of 'i'
   for (int i = 0; i < N; i++)
            ^
0_0_16938349_21898.c:50:12: note: previous definition of 'i' was here
   for (int i = 0; i < N; i++)
            ^
0_0_16938349_21898.c:54:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < N; i++)
   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-09-30 12:20:39, Gzip enabled