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 6598173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:18:22+00:00 2026-05-25T18:18:22+00:00

Couldn’t find any answer to this problem, or not even any questions asked. So

  • 0

Couldn’t find any answer to this problem, or not even any questions asked.
So what I’m trying to do, is a std::vector, maybe just a normal array, of Checkboxes.

std::vector< System::Windows::Forms::CheckBox^ >m_items;
m_items.push_back( myCheckbox );

That’s what I currently have, and it clearly ain’t working.
So does anyone have any ideas, on how to get it working, cause I’ve tried everything I can, but vectors don’t seem to support Checkboxes.

Incase you need the error code:

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory(200): error C3699: '&&' : cannot use this indirection on type 'System::Windows::Forms::CheckBox ^'
1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(421) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=System::Windows::Forms::CheckBox ^
1>          ]
1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(481) : see reference to class template instantiation 'std::_Vector_val<_Ty,_Alloc>' being compiled
1>          with
1>          [
1>              _Ty=System::Windows::Forms::CheckBox ^,
1>              _Alloc=std::allocator<System::Windows::Forms::CheckBox ^>
1>          ]
1>          d:\programming\vc++ projects\mahi wcs race maker\mahi wcs race maker\RestrictedItemsForm.h(69) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=System::Windows::Forms::CheckBox ^
1>          ]
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(630): error C3699: '&&' : cannot use this indirection on type 'System::Windows::Forms::CheckBox ^'
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(655): error C3699: '&&' : cannot use this indirection on type 'System::Windows::Forms::CheckBox ^'
1>d:\programming\vc++ projects\mahi wcs race maker\mahi wcs race maker\RestrictedItemsForm.h(69): error C4368: cannot define 'm_items' as a member of managed 'MahiWCSRaceMaker::RestrictedItemsForm': mixed types are not supported
1>d:\programming\vc++ projects\mahi wcs race maker\mahi wcs race maker\RestrictedItemsForm.h(170): error C2663: 'std::vector<_Ty>::push_back' : 2 overloads have no legal conversion for 'this' pointer
  • 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-25T18:18:23+00:00Added an answer on May 25, 2026 at 6:18 pm

    The regular std::vector does not support CLR reference types. Instead, you must use cliext::vector. Include the following:

    #include <cliext/vector>
    

    And use with:

    cliext::vector<System::Windows::Forms::CheckBox^> items;
    items.push_back(myCheckBox);
    

    Of course, you can also use the regular .Net collections, like List<T>, which behaves similarly as a vector.

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

Sidebar

Related Questions

Couldn't find this anywhere, maybe I'm looking for the wrong verbs. I'm trying to
I couldn't find any definitive answer to this question. I suppose most implementation use
I couldn't find the answer to this in any other question. Suppose that I
I couldn't find any documentation on this. What exactly are these variables with 'at'
I couldn't find any explanation for the following problem. Hope you to help me
Couldn't find an answer to this one. I have a WPF ListView control that
Couldn't find an answer to this question. It must be obvious, but still. I
Couldn't find the answer by serching (maybe bad keywords), so I am creating a
Couldn't find a clear answer to what I'm trying to achieve. I'm sure it's
Couldn't find any documentation about this: what is the order of execution of the

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.