View Single Post
  #3 (permalink)  
Old 06-11-2008, 09:48 AM
Turk4n's Avatar   
Turk4n Turk4n is offline
Guru
 
Join Date: May 2008
Location: 4chan.org/g/
Age: 19
Posts: 632
Credits: 6
Rep Power: 11
Turk4n is just really niceTurk4n is just really niceTurk4n is just really niceTurk4n is just really niceTurk4n is just really nice
Send a message via MSN to Turk4n Send a message via Skype™ to Turk4n
Default Re: C++ Inheritance help!?

Quote:
Originally Posted by v0id View Post
A very simple example, showing how "Derived" inherits the functionality from "Base".
Code:
#include <iostream>

class Base
{
    public:
        void basefunction() { std::cout << "In Base" << std::endl; }
};

class Derived : public Base
{
    public:
        void derivedfunction() { std::cout << "In Derived" << std::endl; }
};

int main()
{
    Base b;
    Derived d;
    
    b.basefunction();
    d.basefunction();
    d.derivedfunction();
        
    return 0;
}
I don't know what you mean by that formula, could you be more specific?
I think he meant, a formula, P must be effect and I ampere and T is for time. Thats my guess, which would be likely he wants to enter two numbers and divide them. As I see your small code, its good and will work if he could work on the rest with it
__________________

Think, feel, know programming!
Reply With Quote