|
From: <and...@us...> - 2013-11-07 22:00:50
|
Revision: 12667
http://sourceforge.net/p/plplot/code/12667
Author: andrewross
Date: 2013-11-07 22:00:46 +0000 (Thu, 07 Nov 2013)
Log Message:
-----------
Fix from Phil Rosenberg for code which uses a const variable to initialise the size of an array. This is not strictly C compliant, though it is valid in C++. Visual studio complains about this.
Modified Paths:
--------------
trunk/examples/c/x22c.c
Modified: trunk/examples/c/x22c.c
===================================================================
--- trunk/examples/c/x22c.c 2013-11-06 02:05:21 UTC (rev 12666)
+++ trunk/examples/c/x22c.c 2013-11-07 22:00:46 UTC (rev 12667)
@@ -200,9 +200,10 @@
PLFLT **u, **v;
const int nx = 20;
const int ny = 20;
- const int nc = 11;
+#define NC 11
+ const int nc = NC;
const int nseg = 20;
- PLFLT clev[nc];
+ PLFLT clev[NC];
dx = 1.0;
dy = 1.0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|