Convert a small C++ code snippet to a C# code -
i got code written in c++:
static double e[66]; if (!e[0]) { // }
it not compile in visual studio saying operator '!' cannot applied operand of type 'double'.
what propar way write in c#?
c# not consider boolean int/double can used true/false statement.
you have write like:
if(e[0] == 0.0) ..
also, can't have local static variable in c++. can declare class member, initialize in static constructor , use it.
Comments
Post a Comment