in stat.h file, the definition of "template<class T>
T max(const Vec<T> &v, int index)" seem not correct. the second parameter should be "int &index", otherwise this index number can not be returned. In this .h file, the definition of min function also has this problem. Also in this .h file these function are called with the incorrect parameter.
I remember this bug has been reported by Eduardo Zacaras B. around August, but do not know why they are not corrected in 3.8.1 distribution.
I found this problem when I want to implement a Galois field caculator. I try to make a Galois field caculator with with a graphic interface(i.e. with CEdit controls and bottons) with VC++.net 2003.
But when I include the "itbase.h" in the mail .cpp file, it says
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2059: syntax error : ')'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2059: syntax error : ')'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2143: syntax error : missing ')' before '}'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2143: syntax error : missing ';' before '}'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2143: syntax error : missing '}' before ')'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2238: unexpected token(s) preceding ';'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2334: unexpected token(s) preceding ':'; skipping apparent function body
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(84): error C2628: 'itpp::Stat' followed by 'double' is illegal (did you forget a ';'?)
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(84): fatal error C1903: unable to recover from previous error(s); stopping compilation
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): warning C4003: not enough actual parameters for macro 'max'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(84): warning C4003: not enough actual parameters for macro 'min'
this is related with the problem I mentioned above.
But when I put this "itbase.h" file before including "stdafx.h". No error message,however, I can not define variable such as "vec".
So could you point out what is my problem?(before this program, I also have done some console program. They are ok.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Concerning your first question, you are right - the bug has been reported by Eduardo and fixed in the latest CVS sources (`itpp' module). However it could not be corrected in release 3.8.1, since it was released on June 22nd, 2005, before the bug was found. Since that last release we have been working towards next release 3.9.0, which is still not ready.
As for your problems with including "stdafx.h" I am sorry, but I can not help you. It is not strictly related to the IT++ library. Besides I am not using MS VC++.NET.
/ediap
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in stat.h file, the definition of "template<class T>
T max(const Vec<T> &v, int index)" seem not correct. the second parameter should be "int &index", otherwise this index number can not be returned. In this .h file, the definition of min function also has this problem. Also in this .h file these function are called with the incorrect parameter.
I remember this bug has been reported by Eduardo Zacaras B. around August, but do not know why they are not corrected in 3.8.1 distribution.
I found this problem when I want to implement a Galois field caculator. I try to make a Galois field caculator with with a graphic interface(i.e. with CEdit controls and bottons) with VC++.net 2003.
But when I include the "itbase.h" in the mail .cpp file, it says
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2059: syntax error : ')'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2059: syntax error : ')'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2143: syntax error : missing ')' before '}'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2143: syntax error : missing ';' before '}'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2143: syntax error : missing '}' before ')'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2238: unexpected token(s) preceding ';'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): error C2334: unexpected token(s) preceding ':'; skipping apparent function body
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(84): error C2628: 'itpp::Stat' followed by 'double' is illegal (did you forget a ';'?)
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(84): fatal error C1903: unable to recover from previous error(s); stopping compilation
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(82): warning C4003: not enough actual parameters for macro 'max'
e:\Program Files\Microsoft Visual Studio .NET 2003\it++\include\base\stat.h(84): warning C4003: not enough actual parameters for macro 'min'
this is related with the problem I mentioned above.
But when I put this "itbase.h" file before including "stdafx.h". No error message,however, I can not define variable such as "vec".
So could you point out what is my problem?(before this program, I also have done some console program. They are ok.)
Hi!
Concerning your first question, you are right - the bug has been reported by Eduardo and fixed in the latest CVS sources (`itpp' module). However it could not be corrected in release 3.8.1, since it was released on June 22nd, 2005, before the bug was found. Since that last release we have been working towards next release 3.9.0, which is still not ready.
As for your problems with including "stdafx.h" I am sorry, but I can not help you. It is not strictly related to the IT++ library. Besides I am not using MS VC++.NET.
/ediap