|
I still get the following error.
Error 6 error C2767: managed array dimension mismatch :
expected 1 argument(s) - 2 provided
After I change this to the following and it worked.
after adding ", 2" to the otherside it worked
But when I add the second dimension as follows it compiles.
static DataSetPI40::PIVar40DataTable^ PIVar40 =
gcnew DataSet_PI40::PIVar40DataTable();
but, when I refer to the Dataset I get the following error.
dsPI40[1][5]->PIVar40[nRecNumID]->ColumnName
Error 8 error C3262: invalid array indexing: 1 dimension(s) specified for 2-dimensional 'cli::array<Type,dimension> ^'
Michael
|
|
|
|
|
I am sorry about not including the second "2":
<code>array<DataSetPI40^, 2>^ dsPI40 = gcnew array<DataSetPI40^, 2>(8, 40);
dsPI40[1, 5]->PIVar40[nRecNumID]->ColumnName</code>
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thanks, but I understood that. However, when I add the variable for the table as above it compiles also.
When I try to load the table above with data it says there is only one dimension, therefore I must be stating the table variable incorrectly I assume, do you know what the problem is.
Michael
|
|
|
|
|
You didn't look at my above response carefully! You wrote:
dsPI40[1][5]->PIVar40[nRecNumID]->ColumnName
I responded with:
dsPI40[1, 5]->PIVar40[nRecNumID]->ColumnName
Your code above had "[1][5]" where the complier compiled only up to the "]" after the 1 and believe you only supplied one dimension.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Everything works great, thanks for the help.
Michael
|
|
|
|
|
I want display only the seconds/milliseconds.
How to code that one, it seems my code below is not working. result is always 0;
System::DateTime moment = System::DateTime(11);
int millisecond = moment.Millisecond;
******************************
I just want to
know everything
|
|
|
|
|
AFAIK the constructor accepts a number of ticks (1/10 of a microsecond), so your
moment is almost zero.
|
|
|
|
|
Luc Pattyn wrote: AFAIK the constructor accepts a number of ticks (1/10 of a microsecond), so your
moment is almost zero.
And how do you "know" that? You haven't been reading the documentation have you?
Can't you get in trouble for that?
|
|
|
|
|
I plead guilty; I am known to occasionally read the documentation.
Sometimes I even believe that helps me in understanding what is going on and why.
|
|
|
|
|
Thanks to all. I got it. :->
******************************
I just want to
know everything
|
|
|
|
|
Bros,
How to code the network speed detection?
What i mean is i want to detect the upload and download using clickbutton. When I press a button it will show to textbox1 the upload speed and textbox2 the download speed.
example:
TextBox1 = 42 kbps
TextBox = 54 kbps
Is anybody here how to do that? Much better if you can give me some links for basic.
Thanks in advance.
******************************
I just want to
know everything
|
|
|
|
|
I doubt there is a way to simply find this as there isn't really a fixed upload and download speed, as the server at the other end is a factor of the upload and download speed.. You could get the application to, for example, download a file and work out the speed in kbps from that, and do the same but upload a file..? This would give an estimation to the upload and download speed..
Hope this helps!
--PerspX
|
|
|
|
|
Hello,
I need to retrieve ALL subdirectories under a specified directroy in my C++ program. Could anyone please tell me how to do this.
Thanks
cy163
|
|
|
|
|
You can with one of the overloads of Directory::GetDirectories
specify AllDirectories if you want it to work recursively,
(or organize a recursion yourself if you are still on .NET 1.x)
|
|
|
|
|
When I have the following code
String ^sBuffer;<br />
sBuffer->Format("Target number is {0}", this->id);
sBuffer will not be updated, but if I change it to
String ^sBuffer;<br />
sBuffer= String::Format("Target number is {0}", this->id);
It seems to work well. However, Is this the best way to use Format?
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
strings are immutable. What you're doing is as good as anything.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I know same classes that I had to use with Visual c++ 6.0
How can I Insert those classes in my new project Visual C++ NET 2005 ?
|
|
|
|
|
1. You can just copy the .h/.cpp files in to the project folder.
2. Right click on the Project in the Solution Explorer and selecct Add->Existing Items
3. Select all the .h / .cpp files from the open file dialog
4. It will add your existing classes into the project
If you want to add the files from the different folder than your project folder, make sure you set the include path correctly.
Regards,
Sivakumar R
|
|
|
|
|
In Solution explorer I don't see the files that a copy in the folder, but with explorer I see them.
What to do, I think this class was not build with Visual c++ NET 2005. Is it the reaon ?
|
|
|
|
|
Hi all,
I'm looking for a simple CLI C++ example of how to connect to a database (pro-grammatically) and show the data on a form, and be able to delete and edit the data.
Thanks you very much
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Are you still looking for examples? It isn't really much different than doing the same in C# or VB.NET...
You just have to deal with the language syntax.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I want to do that: par->Value = atof(this->taux->Text::get()); but it does n't work because atof(const char*) need that.
What to do ?
|
|
|
|
|
This will work:
String ^test = Text1->Text;
char* var = (char*)Marshal::StringToHGlobalAnsi(test).ToPointer();
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
It is advisable to call Marshall::FreeHGlobalAnsi(IntPtr(var)); to clear the memory
|
|
|
|
|
I try And i have this error :
StringToHGlobalAnsi is not a member of Global Namespace
I thing it need one include file. What is this header file ?
|
|
|
|