Very strange error
-
I have this very wierd error message in Visual C++ Express 2005:
1>.\UIEvents.cpp(252) : error C2860: 'void' cannot be an argument type, except for '(void)'
1> This diagnostic occurred while importing type 'VLCWPF::SkinInterface::PlaylistItem ' from assembly 'VLCWPF, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.Here's the offending code:
InputItem *inputitem = item->get_InputItem();
What's most wierd to me is that I can't find anywhere where this mysterious void could be coming from. The class InputItem is very simple, so I can't see why it would have problems:
public class InputItem { public InputItem(string name, string uri, string\[\] inputOptions, int id, InputInterface.InputType inputType) { this.name = name; this.uri = uri; this.inputOptions = inputOptions; this.id = id; this.inputType = inputType; } public InputItem(string name, string uri) : this(name, uri, null, 0, InputInterface.InputType.Unknown) { } public string Name { get { return name; } set { name = value; } } public string Uri { get { return uri; } set { uri = value; } } protected string name; protected string uri; protected string\[\] inputOptions; protected int id; protected InputInterface.InputType inputType; }
Can anyone make any suggestions? I can't figure out for the life of me what could cause this. Joel Holdsworth
-
I have this very wierd error message in Visual C++ Express 2005:
1>.\UIEvents.cpp(252) : error C2860: 'void' cannot be an argument type, except for '(void)'
1> This diagnostic occurred while importing type 'VLCWPF::SkinInterface::PlaylistItem ' from assembly 'VLCWPF, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.Here's the offending code:
InputItem *inputitem = item->get_InputItem();
What's most wierd to me is that I can't find anywhere where this mysterious void could be coming from. The class InputItem is very simple, so I can't see why it would have problems:
public class InputItem { public InputItem(string name, string uri, string\[\] inputOptions, int id, InputInterface.InputType inputType) { this.name = name; this.uri = uri; this.inputOptions = inputOptions; this.id = id; this.inputType = inputType; } public InputItem(string name, string uri) : this(name, uri, null, 0, InputInterface.InputType.Unknown) { } public string Name { get { return name; } set { name = value; } } public string Uri { get { return uri; } set { uri = value; } } protected string name; protected string uri; protected string\[\] inputOptions; protected int id; protected InputInterface.InputType inputType; }
Can anyone make any suggestions? I can't figure out for the life of me what could cause this. Joel Holdsworth
First of all, your InputItem class looks like C#. Assuming the class is located in a C# assembly, your problematic code should look like something like this: InputItem ^inputitem = item->get_InputItem(); The "*" is for unmanaged code.
-
First of all, your InputItem class looks like C#. Assuming the class is located in a C# assembly, your problematic code should look like something like this: InputItem ^inputitem = item->get_InputItem(); The "*" is for unmanaged code.
George L. Jackson wrote:
The "*" is for unmanaged code.
And for old Managed c++
-
I have this very wierd error message in Visual C++ Express 2005:
1>.\UIEvents.cpp(252) : error C2860: 'void' cannot be an argument type, except for '(void)'
1> This diagnostic occurred while importing type 'VLCWPF::SkinInterface::PlaylistItem ' from assembly 'VLCWPF, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.Here's the offending code:
InputItem *inputitem = item->get_InputItem();
What's most wierd to me is that I can't find anywhere where this mysterious void could be coming from. The class InputItem is very simple, so I can't see why it would have problems:
public class InputItem { public InputItem(string name, string uri, string\[\] inputOptions, int id, InputInterface.InputType inputType) { this.name = name; this.uri = uri; this.inputOptions = inputOptions; this.id = id; this.inputType = inputType; } public InputItem(string name, string uri) : this(name, uri, null, 0, InputInterface.InputType.Unknown) { } public string Name { get { return name; } set { name = value; } } public string Uri { get { return uri; } set { uri = value; } } protected string name; protected string uri; protected string\[\] inputOptions; protected int id; protected InputInterface.InputType inputType; }
Can anyone make any suggestions? I can't figure out for the life of me what could cause this. Joel Holdsworth
You're using 2 different languages here. I don't know that C# has a dereference operator, except in unsafe blocks. Thanks, John
-
First of all, your InputItem class looks like C#. Assuming the class is located in a C# assembly, your problematic code should look like something like this: InputItem ^inputitem = item->get_InputItem(); The "*" is for unmanaged code.
I almost forgot! The "get_" in "item->get_InputItem()" may also be a problem!