Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6221211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:05:35+00:00 2026-05-24T08:05:35+00:00

I am having problems with the syntax in c++/cli when I try to define

  • 0

I am having problems with the syntax in c++/cli when I try to define a c++/cli value struct as a TValue in a Dictionary

I am doing this because I want to maintain a map between a native class pointer and a system::String (with String as the key), so have wrapped the native pointer in a struct.

value struct MyStruct
{
   NativeClass *m_p;
}

Dictionary<System::String ^, MyStruct> MyMap;

NativeClass* FindLigandModelMap(System::String ^file)
{
   MyStruct m;
   if (m_LigandToModelMap.TryGetValue(file, %m)) <--- ERROR HERE
      return(m.m_p);
   return(NULL);
}

Thi gives a compiler error: error C2664: ‘System::Collections::Generic::Dictionary::TryGetValue’ : cannot convert parameter 2 from ‘MyStruct ^’ to ‘MyStruct %’

I have tried various declarations of MyStruct with no success.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:05:38+00:00Added an answer on May 24, 2026 at 8:05 am

    Should be just

    m_LigandToModelMap.TryGetValue(file, m)
    

    In C++, byref arguments don’t provide any caller-side hint.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problems understanding this. It's in intel syntax cmp eax, 0x19 ja greater
I'm practicing object oriented syntax in javascript and am having some problems. This is
I'm having problems with Visual Studio 2008, namely, syntax-highlighting and intellisense for *.aspx, *.js
I am having two minor problems in this code but i am unable to
I'm having problems understanding the MYSQL join syntax. I can't seem to manipulate it
I am having problems creating a managed class with namespace in C++/CLI. I would
In this question , TofuBeer was having problems creating a genericized IterableEnumeration . The
The syntax is killing me! the next query is having problems: $cadbusca=SELECT * ,
I come from a C++/Java background, but I'm having problems getting the syntax right
I am having problems finding the proper XPATH syntax to get the nodes I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.