Constructor

This is a discussion on Constructor within the C++ Programming forums, part of the General Programming Boards category; A constructor that accepts a pair of integers corresponding to the numerator and denominator of the rational number. Thus passing ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    5

    Constructor

    A constructor that accepts a pair of integers corresponding to the numerator and denominator of the rational number. Thus passing in a numerator of 3 and a denominator of 4 would create an object representing the rational number 3/4.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Do you have a question? Please read our homework policy.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    478
    Aww. You're not the sharpest knife in the drawer, are you?
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  4. #4
    Registered User
    Join Date
    Sep 2009
    Posts
    5
    actually it is my first day in this website i dont really know what kind of help should i expact

  5. #5
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Quote Originally Posted by slow++ View Post
    actually it is my first day in this website i dont really know what kind of help should i expact
    We don't do people's homework for them, but we will help. You need to attempt the assignment on your own, then post any questions/problems you encounter along the way.
    bit∙hub [bit-huhb] n. A source and destination for information.

  6. #6
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,302
    Quote Originally Posted by slow++ View Post
    actually it is my first day in this website i dont really know what kind of help should i expact
    Expect the kind of help that you first need to ask for.

    For example, the problem could be that you don't know what a rational number is. In which case you would say: "This paragraph talks about something called a 'rational number'. What is that?"/ To which we would probably tell you to "STFW!".
    That's probably not your actual question. So, what is your actual question...?
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  7. #7
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 06-10-2008, 08:38 PM
  2. C++ have a constructor call another constructor
    By QuestionC in forum C++ Programming
    Replies: 4
    Last Post: 05-17-2007, 01:59 AM
  3. Replies: 3
    Last Post: 03-25-2006, 11:59 PM
  4. Need help in classes
    By LBY in forum C++ Programming
    Replies: 11
    Last Post: 11-26-2004, 03:50 AM
  5. Constructor with Parameter not Firing
    By BillBoeBaggins in forum Windows Programming
    Replies: 4
    Last Post: 08-26-2004, 02:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21