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

  • SEARCH
  • Home
  • 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 8743225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:38:19+00:00 2026-06-13T11:38:19+00:00

So what im doing is creating a form that bitmaps move around and when

  • 0

So what im doing is creating a form that bitmaps move around and when they collide they “fight”. The bitmaps are saved a VBot and inherited into child bots which to keep track of the bots i built an array of pointers. The VBot and BotContainer are .h and .cpp files but when i attempt to create a private BotContainer in Form.h to keep track off the Bots it gives me the error message

Error 1 error C4368: cannot define ‘VList’ as a member of managed ‘Prog3::Form1’: mixed types are not supported c:\users\duerst\documents\visual studio 2010\projects\prog 3\prog 3\Form1.h 65 1 Prog 3

What can i do to fix this?

  • 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-06-13T11:38:20+00:00Added an answer on June 13, 2026 at 11:38 am

    You are doing something like this:

    class BotContainer
    {
        ...
    };
    
    public ref class Form1
    {
    private:
        BotContainer VList;
    
        ...
    };
    

    This is illegal because managed types can’t have members of unmanaged types (and vice-versa). You need to use a pointer to a BotContainer, which you instantiate in the constructor and delete in the destructor:

    public ref class Form1
    {
    private:
        BotContainer* VList;
    
    public:
        Form1()
        {
            VList = new BotContainer();
            ...
        }
    
        ~Form1()
        {
            delete VList;
        }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

what I am doing is creating a form using JSON this form can then
I am creating a simple application with Django. I realized that I am doing
I have a Windows form application that users can log into. The application is
I'm creating an application (Windows Form) that allows the user to take a screenshot
I have a C# form that I am creating completely manually (i.e. without using
I am creating a form dynamically, however the routine that closes it, is located
I'm creating a hidden contact form that would appear when the mouse is positioned
I'm creating an implementation that performs conversion from one form to another. The design
I'm doing this simple testing on creating form where I want the form to
What I am doing is creating an object(A) that holds a reference to another

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.