473,395 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Passing List<double> to a C++ Class Library from C#

hi,

I'm trying to pass a List<double> array from C# to a C++ class library
but I get the following error:
"No overload for method 'zzz' takes '1' arguments"

My C++ method in the library has 1 argument:
zzz(List<double> x)

and i'm calling it from C# with:
List<double> test = new List<double>();
test.Add(0.123);
objTest.zzz(test);

Any pointers/links to information on this topic would be appreciated

Jamie
Mar 31 '06 #1
2 3919
You need a 'reference' type argument in C++/CLI, so change your code like
this.

zzz(List<double>^ x)

All you need to know is written in the Ecma-372 "C++/CLI Language
Specification" which can be found here: http://www.ecma-international.org/.

Willy.

"jamie" <no@address.com> wrote in message
news:PZ*******************@news20.bellglobal.com.. .
| hi,
|
| I'm trying to pass a List<double> array from C# to a C++ class library
| but I get the following error:
| "No overload for method 'zzz' takes '1' arguments"
|
| My C++ method in the library has 1 argument:
| zzz(List<double> x)
|
| and i'm calling it from C# with:
| List<double> test = new List<double>();
| test.Add(0.123);
| objTest.zzz(test);
|
| Any pointers/links to information on this topic would be appreciated
|
| Jamie
Mar 31 '06 #2
All you need to know is written in the Ecma-372 "C++/CLI Language
Specification" which can be found here: http://www.ecma-international.org/.

Willy.


thanks for the tip.
Jamie
Mar 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ivan Paganini | last post by:
Hello all. I'm trying to use a vector<double> to alocate de data that i need, and I am passing by reference to the function to receive the values. The code goes like this: //code void...
13
by: Jalal | last post by:
I am trying to use numeric_limits<double>::min() in an MFC application in Microsoft Visual C++.NET 2003. I am having some difficulties here. The following are the parts of a simple program I wrote...
2
by: jamie | last post by:
hi, I'm trying to pass a List<double> array from C# to a C++ class library but I get the following error: "No overload for method 'zzz' takes '1' arguments" My C++ method in the library has 1...
3
by: Web learner | last post by:
The following code works fine private List<double> GetDataFor(string column, int selectedYear) { ------- ------- return list; } foreach (double item in GetDataFor("AirTemp", selectedYear))...
4
by: Sin Jeong-hun | last post by:
List<List<T>a=param; List<List<T>b=a; If I change b, then a is get changed. I want another copy of a, that is completely independent of a. I used double-nested for loop to copy each element...
6
by: janzon | last post by:
Hi I have a class Foo that I use both as a Foo<doubleand a Foo<float>. I want to put instances of this class in a list container. The list container itself is a template and need a type...
5
by: J.M. | last post by:
I am trying to use a software package in my program, the problem being different methods are used to store vectors. I have "my" vectors stored as vector<doublefrom the STL and need to pass a...
32
by: T. Crane | last post by:
Hi, I'm struggling with how to initialize a vector<vector<double>> object. I'm pulling data out of a file and storing it in the vector<vector<double>object. Because any given file will have a...
0
by: Marc Gravell | last post by:
Well, I'd have to wonder why you don't just use Dictionary<,/ SortedList<,/ SortedDictionary<,(and just use .Keys and .Values) But something like below: List<KeyValuePair<DateTime, double>list...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.