03-03-2010 01:58 AM - edited 03-03-2010 02:07 AM
I've been using NI CVI 2009 and thus programmed. Now I have purchased CVI 8 and wants to continue programming. But CVI reports errors in the source code of CVI 9 and I do not understand what the problem is?
example
char save[size+1];
erros
128, 22 Integer expression must be constant.
What is wrong with this simple line of code which previously worked perfectly?
Solved! Go to Solution.
03-03-2010 02:36 AM - edited 03-03-2010 02:36 AM
Unfortunately variable-lenght array declarations is a c99 feature which is supported in CVI9 but probably not in release 8. If you are running CVI8.5, you may try adding this pragma to the code and see if this solves the problem, but according to this list of features posted by Luis I'm not positive in this respect:
#pragma iso_9899_1999;
03-03-2010 03:32 AM
In fact, I have only version 8.0
Ok So now I have to follow the standard ANSI C 89. Good to know.
I have solved the above-mentioned problem by malloc.
I hope I have with CVI 8 not further unpleasant surprises.