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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:43:05+00:00 2026-05-27T17:43:05+00:00

In object-oriented programming, I know you can pass control between classes, which makes things

  • 0

In object-oriented programming, I know you can pass control between classes, which makes things much more organized. I realize that there aren’t classes in C because it isn’t an object-oriented programming language, but is there a way that I can write a new file, that I can pass control to? Just to make things easier?

What I’m really asking is : how do I pass control to an outside extension of the program, and do I need to use any special type of program (.dll, etc.)

  • 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-27T17:43:05+00:00Added an answer on May 27, 2026 at 5:43 pm

    Basically, C++ does not introduce much in the sence of program structure organization when compared to C.

    You don’t really pass controll between classes in C++. You just call methods of classes. Class methods are just functions with several additional capabilities. Thus you can use the same tactics of passing control in C as you do in C++. For example:

    //C++
    class A {
    public:
    A(int n) { /*...*/ }
    int DoSomething() { /*...*/ }
    protected:
    int m_SomeMember;
    double m_AnotherMember;
    };
    
    AInst(8);
    int x = AInst.DoSomething();
    
    //C
    struct A {
    int m_SomeMember;
    double m_AnotherMember;
    };
    
    void InitializeA(struct A* pa, int n)
    { 
    /*...*/ 
    }
    
    int DoSomethingWithA(struct A* pa)
    {
    /*...*/ 
    }
    
    struct A AStructInst;
    InitializeA(&AStructInst, 8);
    int y = DoSomethingWithA(&AStructInst);
    

    The only problem, you may need more effort to structurize your program in C when compared to C++. For example, the latter language will take care about proper initialization and destruction of objects, while in C you have to take care of such stuff yourself.

    As for using static and/or dynamic libraries, the 2 languages are mostly identical. You will have more trouble when trying to make C++ libraries portable to other compiler and/or platform though due to many subtle differences like function names mangling, vtables and stuff like that.

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

Sidebar

Related Questions

As we know c++ is also an Object Oriented Programming language where most the
I'm new to object oriented programming and flash. As far as I know, global
I am new to object oriented programming and writing some of my first classes
I am interested in understanding object-oriented programming in a more academic and abstract way
Im new to PHP Object Oriented Programming but I know to code in procedural
What nice POOP (Prototype-based Object-oriented Programming) Frameworks exist in Lisp and Scheme? I know
I'm relatively new to Object Oriented Programming. I pretty much understand the concepts, but
What languages are available that promote both object-oriented and functional programming? I know that
Well, I know object oriented programming in PHP, and I understand it pretty well
In object-oriented programming, we might say the core concepts are: encapsulation inheritance, polymorphism What

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.