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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:32:00+00:00 2026-06-13T10:32:00+00:00

I have a class Con as this:- class Con { public: struct MachineList {

  • 0

I have a class Con as this:-

class Con
{
 public:
  struct MachineList
  {
    BSTR AccountId;
    BSTR MachineId;
    BSTR Make;
    char* Make1;
    BSTR Model;
    char* Model1;
    BSTR SerialNumber;
    BSTR IpAddress;
    char* IpAddress1;
    BSTR Port;
    int Port1;
    BSTR LocationCode;
    } machinelist[100] ;
   int w;
 } ;

i created an object of Con class as Con m_con;

I have another class Test

class Test
{
 public:
  void fun();//i want to pass the object of the structure that i created in Con
  //what arguments should i pass in fun function?
};
  • 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-13T10:32:01+00:00Added an answer on June 13, 2026 at 10:32 am
    class Con {
    public:
       struct Machine {
          BSTR  AccountId;
          BSTR  MachineId;
          BSTR  Make;
          char* Make1;
          BSTR  Model;
          char* Model1;
          BSTR  SerialNumber;
          BSTR  IpAddress;
          char* IpAddress1;
          BSTR  Port;
          int   Port1;
          BSTR  LocationCode;
       };
       typedef Machine Machines[100];
    
       Machines machines;
       int      w;
    };
    
    /**
     * passing a reference to a single machine, which fun might change
     */
    void fun0( Con::Machine & machine );
    
    /**
     * passing a reference to a single machine, which fun cannot change
     */
    void fun1( const Con::Machine & machine );
    
    /**
     * passing a reference to the entire array of machines, which fun may change
     */
    void fun2( Con::Machines & machines );
    
    /**
     * passing a reference to the entire array of machines, which fun cannot change
     */
    void fun3( const Con::Machines & machines );
    

    I don’t understand which version of fun you want so I have made four…

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

Sidebar

Related Questions

I have class that looks like this: class A { public: class variables_map vm
I have the following code public class BaseController : Controller { SqlConnection con; DataSet
I have a class like this: class connect:IDisposable { public void OpenChannel(SqlConnection ch) {
I have this entity: public class MyEntity { [Key] public int Id { get;
I have this class: public class SaveState implements Serializable { private static final long
I have class with back reference: public class Employee : Entity { private string
I have class with collection as below public class MyClass:IXmlSerializable { int vesrion; private
I have class like this below shown. which contains the shopping items where the
I have CameraList class that provides Cameras list like SONY,VIVOTEK,VIVOTEK 7XXX,PIXORD,TOSHIBA,JVC E-CON... And I
Im a bit unsure and have to get advice. I have the: public class

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.