Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Very strange error

Very strange error

Scheduled Pinned Locked Moved Managed C++/CLI
c++helpquestionannouncement
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joel Holdsworth
    wrote on last edited by
    #1

    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

    G J 2 Replies Last reply
    0
    • J 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

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      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.

      S G 2 Replies Last reply
      0
      • G George L Jackson

        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.

        S Offline
        S Offline
        Saksida Bojan
        wrote on last edited by
        #3

        George L. Jackson wrote:

        The "*" is for unmanaged code.

        And for old Managed c++

        1 Reply Last reply
        0
        • J 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

          J Offline
          J Offline
          John L DeVito
          wrote on last edited by
          #4

          You're using 2 different languages here. I don't know that C# has a dereference operator, except in unsafe blocks. Thanks, John

          1 Reply Last reply
          0
          • G George L Jackson

            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.

            G Offline
            G Offline
            George L Jackson
            wrote on last edited by
            #5

            I almost forgot! The "get_" in "item->get_InputItem()" may also be a problem!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups