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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:11:59+00:00 2026-06-02T05:11:59+00:00

Lets say in main() I create an object pointer called BOB from a class

  • 0

Lets say in main() I create an object pointer called BOB from a class called TheBuilder and I do this like this

TheBuilder *BOB = new TheBuilder();

Now lets say I have a function that I want to pass this to called helloWorld inside of main. How do I pass this BOB pointer to TheBuilder object? How do I call it and what does the parameter list for helloWorld() look like?

I want to be able to modify data inside of the object that BOB is pointing to inside of the member function helloWorld.

I know it probably has some ‘*’ or ‘&’ but I don’t know where to put them.

Thanks

  • 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-02T05:12:00+00:00Added an answer on June 2, 2026 at 5:12 am
    class TheBuilder
    {
        <class def>
    }
    
    void helloWorld (TheBuilder* obj)
    {
        <do stuff to obj, which points at BOB>;
    }
    
    int main ()
    {
        TheBuilder *BOB = new TheBuilder();
        helloWorld (BOB);
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

lets say i have a class defined as shown below. Lets now say i
Lets say I'm storing an array or object called $_SESSION[logged_in_user] . If I need
Lets say I have : (this class Is OK) class CCheckSystemEndianess { private: int
Lets say I want to implement a smart pointer a_ptr which can be compared
Lets say I have an abstract base class and a derived class with some
Lets say I have three divs in my HTML <div> <h2>This is div 1</h2>
Lets say I have a field. Lets call it Barcode1. Right now all Barcodes1
This is more of a conceptual question. If it helps, lets say it falls
So lets say I have this interface: public interface IBox { public void setSize(int
I'm having a little confusion when distinguishing this in an as3 file lets say

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.