CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Threaded View

  1. #1
    Join Date
    Nov 2006
    Location
    Australia
    Posts
    1,569

    [RESOLVED] cannot convert parameter 1 from 'ushort' to 'ushort &'

    Guys there's something here that I'm not seeing... very tired so it's probably why.. but yeah:

    The function I'm calling to:
    Code:
    void Inventory::SetCurrentItem(ushort& item_ID, const ushort& item_type)
    The line I use to call the function:
    Code:
    SetCurrentItem(item.GetItemID(), item.GetType());
    A ushort is an unsigned short int.
    GetItemID() returns a ushort.
    GetType() returns a ushort.

    The error that I get:
    Code:
    Error	1	error C2664: 'Inventory::SetCurrentItem' : cannot convert parameter 1 from 'ushort' to 'ushort &'	c:\documents and settings\user\my documents\visual studio 2005\projects\hex\hex\inventory.cpp	779
    Last edited by Mybowlcut; April 13th, 2007 at 10:24 AM.
    Good judgment is gained from experience. Experience is gained from bad judgment.
    Cosy Little Game | SDL | GM script | VLD | Syntax Hlt | Can you help me with my homework assignment?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured