Int64 minus....
-
Hi guys, I have a question ya... minus a int64 with another int64.. below is my coding :-
System::Int64^ limit1; System::Int64^ limit2; System::Int64^ diff; diff = limit1-limit2;
the limit1 and limit2 values are the count of the records in a database. but the diff-limit1-limit2; is not working. i am new to managed c++.kindly help me... Regards, Thilek
-
Hi guys, I have a question ya... minus a int64 with another int64.. below is my coding :-
System::Int64^ limit1; System::Int64^ limit2; System::Int64^ diff; diff = limit1-limit2;
the limit1 and limit2 values are the count of the records in a database. but the diff-limit1-limit2; is not working. i am new to managed c++.kindly help me... Regards, Thilek
Either of these should work:
System::Int64 limit1 = 100; System::Int64 limit2 = 25; System::Int64 diff = limit1 - limit2; System::Int64^ limit1 = gcnew System::Int64(100); System::Int64^ limit2 = gcnew System::Int64(25); System::Int64^ diff = gcnew System::Int64(\*limit1 - \*limit2);
System::Int64 is a value type, so if you want to use handles to a value type (e.g. System::Int64^) then you need to create objects on the managed heap. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hi guys, I have a question ya... minus a int64 with another int64.. below is my coding :-
System::Int64^ limit1; System::Int64^ limit2; System::Int64^ diff; diff = limit1-limit2;
the limit1 and limit2 values are the count of the records in a database. but the diff-limit1-limit2; is not working. i am new to managed c++.kindly help me... Regards, Thilek
Don't use handles on value types.
David Anton http://www.tangiblesoftwaresolutions.com Convert C++ to C#, VB, or Java Convert Java to C#, VB, or C++ Convert VB to C#, C++, Java, or Python Convert C# to VB, C++, Java, or Python