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_24438681_10282.c:1:1: error: expected identifier or '(' before '/' token
 // Note by Jelani:
 ^
0_0_24438681_10282.c:4:1: error: missing terminating ' character
 // programming assignments in Harvard's CS 124 course
 ^
0_0_24438681_10282.c:6:31: error: stray '@' in program
 // AUTHOR: ERIC PRICE <ecprice@cs.utexas.edu>
                               ^
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/assert.h:15,
                 from 0_0_24438681_10282.c:8:
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_24438681_10282.c:13:1: error: expected identifier or '(' before '/' token
 // From https://stackoverflow.com/a/3982397/3376090.
 ^
0_0_24438681_10282.c:30:25: error: stray '#' in program
   int nvars, ncons;  // # decision vars and # constraints
                         ^
0_0_24438681_10282.c:30:45: error: stray '#' in program
   int nvars, ncons;  // # decision vars and # constraints
                                             ^
0_0_24438681_10282.c: In function 'init_LP':
0_0_24438681_10282.c:50:5: error: dereferencing pointer to incomplete type
   lp->nvars = nvars;
     ^
0_0_24438681_10282.c:51:5: error: dereferencing pointer to incomplete type
   lp->ncons = ncons;
     ^
0_0_24438681_10282.c:52:5: error: dereferencing pointer to incomplete type
   lp->cols = nvars + 1;
     ^
0_0_24438681_10282.c:53:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < lp->nvars + 1; i++) {
   ^
0_0_24438681_10282.c:53:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_24438681_10282.c:53:25: error: dereferencing pointer to incomplete type
   for (int i = 0; i < lp->nvars + 1; i++) {
                         ^
0_0_24438681_10282.c:54:7: error: dereferencing pointer to incomplete type
     lp->obj[i] = 0.0;
       ^
0_0_24438681_10282.c:56:12: error: redefinition of 'i'
   for (int i = 0; i < lp->ncons; i++) {
            ^
0_0_24438681_10282.c:53:12: note: previous definition of 'i' was here
   for (int i = 0; i < lp->nvars + 1; i++) {
            ^
0_0_24438681_10282.c:56:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < lp->ncons; i++) {
   ^
0_0_24438681_10282.c:56:25: error: dereferencing pointer to incomplete type
   for (int i = 0; i < lp->ncons; i++) {
                         ^
0_0_24438681_10282.c:57:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for (int j = 0; j < lp->cols; j++) {
     ^
0_0_24438681_10282.c:57:27: error: dereferencing pointer to incomplete type
     for (int j = 0; j < lp->cols; j++) {
                           ^
0_0_24438681_10282.c:58:9: error: dereferencing pointer to incomplete type
       lp->c[i][j] = 0.0;
         ^
0_0_24438681_10282.c:61:12: error: redefinition of 'i'
   for (int i = 0; i < lp->nvars; i++) {
            ^
0_0_24438681_10282.c:56:12: note: previous definition of 'i' was here
   for (int i = 0; i < lp->ncons; i++) {
            ^
0_0_24438681_10282.c:61:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < lp->nvars; i++) {
   ^
0_0_24438681_10282.c:61:25: error: dereferencing pointer to incomplete type
   for (int i = 0; i < lp->nvars; i++) {
                         ^
0_0_24438681_10282.c:62:7: error: dereferencing pointer to incomplete type
     lp->nonbasic_orig[i] = i;
       ^
0_0_24438681_10282.c:64:12: error: redefinition of 'i'
   for (int i = 0; i < lp->ncons; i++) {
            ^
0_0_24438681_10282.c:61:12: note: previous definition of 'i' was here
   for (int i = 0; i < lp->nvars; i++) {
            ^
0_0_24438681_10282.c:64:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < lp->ncons; i++) {
   ^
0_0_24438681_10282.c:64:25: error: dereferencing pointer to incomplete type
   for (int i = 0; i < lp->ncons; i++) {
                         ^
0_0_24438681_10282.c:65:7: error: dereferencing pointer to incomplete type
     lp->basic_orig[i] = i + nvars;
       ^
0_0_24438681_10282.c: In function 'pivot':
0_0_24438681_10282.c:70:3: error: expected expression before '/' token
   // Enforce that the old col remains nonnegative.
   ^
0_0_24438681_10282.c:89:5: error: dereferencing pointer to incomplete type
   lp->obj[col] = 0.0;
     ^
0_0_24438681_10282.c:90:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = 0; j < lp->cols; j++){
   ^
0_0_24438681_10282.c:90:25: error: dereferencing pointer to incomplete type
   for (int j = 0; j < lp->cols; j++){
                         ^
0_0_24438681_10282.c:91:7: error: dereferencing pointer to incomplete type
     lp->obj[j] += coeff * lp->c[row][j];
       ^
0_0_24438681_10282.c:91:19: error: 'coeff' undeclared (first use in this function)
     lp->obj[j] += coeff * lp->c[row][j];
                   ^
0_0_24438681_10282.c:91:19: note: each undeclared identifier is reported only once for each function it appears in
0_0_24438681_10282.c:91:29: error: dereferencing pointer to incomplete type
     lp->obj[j] += coeff * lp->c[row][j];
                             ^
0_0_24438681_10282.c:94:3: error: expected expression before '/' token
   // Update maps to original indices.
   ^
0_0_24438681_10282.c: In function 'simplex':
0_0_24438681_10282.c:99:3: error: expected expression before '/' token
   // Bland's rule: pick an arbitrary column and
   ^
0_0_24438681_10282.c:99:3: error: missing terminating ' character
0_0_24438681_10282.c:138:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < lp->ncons; i++) {
   ^
0_0_24438681_10282.c:138:25: error: dereferencing pointer to incomplete type
   for (int i = 0; i < lp->ncons; i++) {
                         ^
0_0_24438681_10282.c:139:7: error: dereferencing pointer to incomplete type
     lp->assignments[lp->basic_orig[i]] = lp->c[i][0];
       ^
0_0_24438681_10282.c:139:23: error: dereferencing pointer to incomplete type
     lp->assignments[lp->basic_orig[i]] = lp->c[i][0];
                       ^
0_0_24438681_10282.c:139:44: error: dereferencing pointer to incomplete type
     lp->assignments[lp->basic_orig[i]] = lp->c[i][0];
                                            ^
0_0_24438681_10282.c:141:12: error: redefinition of 'i'
   for (int i = 0; i < lp->nvars; i++) {
            ^
0_0_24438681_10282.c:138:12: note: previous definition of 'i' was here
   for (int i = 0; i < lp->ncons; i++) {
            ^
0_0_24438681_10282.c:141:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < lp->nvars; i++) {
   ^
0_0_24438681_10282.c:141:25: error: dereferencing pointer to incomplete type
   for (int i = 0; i < lp->nvars; i++) {
                         ^
0_0_24438681_10282.c:142:7: error: dereferencing pointer to incomplete type
     lp->assignments[lp->nonbasic_orig[i]] = 0.0;
       ^
0_0_24438681_10282.c:142:23: error: dereferencing pointer to incomplete type
     lp->assignments[lp->nonbasic_orig[i]] = 0.0;
                       ^
0_0_24438681_10282.c: In function 'phase1':
0_0_24438681_10282.c:148:3: error: expected expression before '/' token
   // Find equation with minimum b
   ^
0_0_24438681_10282.c:150:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 1; i < lp->ncons; i++) {
   ^
0_0_24438681_10282.c:150:25: error: dereferencing pointer to incomplete type
   for (int i = 1; i < lp->ncons; i++) {
                         ^
0_0_24438681_10282.c:151:11: error: dereferencing pointer to incomplete type
     if (lp->c[i][0] < lp->c[worst_row][0]) {
           ^
0_0_24438681_10282.c:151:25: error: dereferencing pointer to incomplete type
     if (lp->c[i][0] < lp->c[worst_row][0]) {
                         ^
0_0_24438681_10282.c:151:29: error: 'worst_row' undeclared (first use in this function)
     if (lp->c[i][0] < lp->c[worst_row][0]) {
                             ^
0_0_24438681_10282.c:156:9: error: dereferencing pointer to incomplete type
   if (lp->c[worst_row][0] >= -1e-8) {
         ^
0_0_24438681_10282.c:160:3: error: expected expression before '/' token
   // Add a new variable epsilon, which we minimize.
   ^
0_0_24438681_10282.c:165:10: error: 'orig_obj' undeclared (first use in this function)
   memcpy(orig_obj, lp->obj, sizeof(double) * lp->cols);
          ^
0_0_24438681_10282.c:165:22: error: dereferencing pointer to incomplete type
   memcpy(orig_obj, lp->obj, sizeof(double) * lp->cols);
                      ^
0_0_24438681_10282.c:165:48: error: dereferencing pointer to incomplete type
   memcpy(orig_obj, lp->obj, sizeof(double) * lp->cols);
                                                ^
0_0_24438681_10282.c:166:12: error: redefinition of 'i'
   for (int i = 0; i < lp->cols; i++) {
            ^
0_0_24438681_10282.c:150:12: note: previous definition of 'i' was here
   for (int i = 1; i < lp->ncons; i++) {
            ^
0_0_24438681_10282.c:166:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0; i < lp->cols; i++) {
   ^
0_0_244


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-11-26 02:45:21, Gzip enabled