By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,465 Members | 1,435 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,465 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.