|
Thank Richard
textBox10->Text = (DJSubTot + DJVATTot + DJFreightTot).ToString();
The above line
Thank Again
|
|
|
|
|
I have had another look at the documentation and cannot see why the error occurs. As I already mentioned, I do not have C++/CLI (and don't want it) on my system, so cannot test it further.
|
|
|
|
|
It's ok Richard, Thank Again for reply
The following code clears my error()
textBox10->Text = Convert::ToString(Decimal::Add(Decimal::Add(DJSubTot, DJVATTot), DJFreightTot));
modified 13-Apr-18 21:22pm.
|
|
|
|
|
Hi,
I have a small project in VS2010 and its working fine. Now I am trying to upgrade to VS 2015 & Found Visual C++ by using creating project C++/Cli->UI->Windows Forms Applications.
I get struck in following simple codes, I cannot identify my mistake.
public ref class My_ProjectData
{
public:
static System::Data::DataTable^ UnitRateTbl = gcnew System::Data::DataTable();
public: static void MyUnitRate_Collect() {
String^ ICode=String::Empty;
for(int W1=0; W1<=UnitRateTbl->Rows->Count-1; W1++){
ICode=UnitRateTbl->Rows[W1]["itm_code"]->ToString(); }
};
Error : function "System::Data::DataRowCollection::default[int]::get" cannot be called with the given argument list
Thanks for the helps
|
|
|
|
|
I have looked at the documentation and cannot see an error in that line of code. However, I notice that you have declared UnitRateTbl as static , and wonder if that may be the problem.
|
|
|
|
|
Thank Richard,
I checked by Without static declaration, but still the error raised.
I assume that, we have to supply the datatype to that for loop variable [W1].[May be Not sure]
String^ ICode=String::Empty;
for(int W1=0; W1<=UnitRateTbl->Rows->Count-1; W1++){
ICode=UnitRateTbl->Rows[<int^>W1]["itm_code"]->ToString(); ??????????????
}
Thanks Again
|
|
|
|
|
That will not help since the data type is already defined in your for expression. You could try breaking the statement into its parts:
DataRow row = UnitRateTbl->Rows[W1];
ICode= row["itm_code"];
... and see what happens.
|
|
|
|
|
|
Okay ...I was working on making my own string class using dynamic memory allocation. The things were working fine. But when I sent the same code to one of my friends the code crashed. He was using the same compiler. The then copied pasted the same code in another source file, so it crashed. Then I changed the name of the original file, again program crashed. But I changed to name again to previous one and then again program was working fine. so whats this whole thing. c++.
P.S: I have dynamic memory and pointers.
|
|
|
|
|
Member 13767759 wrote: so whats this whole thing. You think we can somehow guess?
|
|
|
|
|
You should use "Remote Desktop" to dial into your friend's computer, do the "paste" thing, and then tell them what bozos they were for not following your instructions (assuming they work).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Hi,
I wish to convert from c# for the following codes contain get_Item & set_Value convertion in C++/Cli.
Code:
private static void SetWIAProperty(IProperties properties, object propName, object propValue)
{
Property prop = properties.get_Item(ref propName);
prop.set_Value(ref propValue);
}
Any guidences will be helpful.
Thanks Again
modified 9-Apr-18 12:19pm.
|
|
|
|
|
How to add columns dynamically to wpf datagrid in mvvm without using dependency proporties
|
|
|
|
|
|
Does anybody know how to detect when option -Gr is in effect? I mean there is (AFAICS)
no built-in define _Gr in such a case.
-- Gisle V.
|
|
|
|
|
Hi,
With the MSVC compiler you can do:
#ifdef _CPPRTTI
#endif
I think with GCC you can do:
#ifdef __GXX_RTTI
#endif
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks, but RTTI and option -GR has nothing to do with option -Gr AFAICS.
-Gr is fastcall and -GR is to enable C++ RTTI.
-- Gisle V.
|
|
|
|
|
Yeah I missed the lower case. (I'm getting old and losing my eye sight.)
On an older version of Visual Studio you would need to parse __FUNCSIG__ with some preprocessor wizardry. This macro is only available inside the function.
Visual Studio 2012 and above supports the latest C++11,C++14 Decltype and Call Expressions[^] version 1.1
You would use it like this:
Callable Objects with different calling conventions[^]
Best Wishes,
-David Delaune
|
|
|
|
|
I need help with this project. anyone who can help?
|
|
|
|
|
|
Hello Guys..
i am about to work on sdk that built in C/C++ ... how i can communicate with it using C# ?
it`s requires C++ language which is hard to learn in a few days...
Real-Time push server in C++ may i use it as un-managed dll`s so i can work on it using C# ?
|
|
|
|
|
Yes, you should be able to create a C++/CLI Assembly (DLL) which exposes functionality to C# via ref classes. Those managed classes can call into the C/C++ SDK to do the necessary work. Reference the C++/CLI assembly from your C# code and call into it... profit!
|
|
|
|
|
Hi everyone!
I created a library with Entity Framework 6 in C# recently, and now I would like to use it with a C++ program. Consequently I though about using C++/CLI to reuse my C# code, translating it easily. Is it a good/logical choice? I'm not sure because I don't know much about C++/CLI.
I'm trying to follow the steps I used to create my C# library. Now I'm stuck with adding the element "ADO.Net Entity Data Model" to my project in Visual Studio 2015. How can I do that?
I couldn't find any tutorial about using Entity Framework with C++/CLI, that's why I'm a bit lost.
Thanks !
|
|
|
|
|
|
Rather than wasting the time of busy professionals, why not give this a try yourself? You might actually learn something (even if that something is that you only know how to start the program off and not how to finish it, showing you where you need to study more). This site is CodeProject, not RentACoder.
This space for rent
|
|
|
|