Thread: C/C++ objects

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    1

    C/C++ objects

    I have three objects in C and c++ A,B,C .
    will it be correct or not? explain with proper reason:-

    C=A+B; //in c
    C=A+B; // in c++

    In c++ without operator overloading,give me answer.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    This seems like a homework question. Is it? In that case, I would ask if you know the answer yourself.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    Try It.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    - First post
    - Wrong forum
    - Homework question

    <clap><clap>
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Quote Originally Posted by uzma_83 View Post
    I have three objects in C and c++ A,B,C .
    will it be correct or not? explain with proper reason:-

    C=A+B; //in c
    C=A+B; // in c++

    In c++ without operator overloading, give me answer.
    The bold parts indicate that the phrasing is from a professor. The blue part that it is written from a student. There is only one explanation: homework

  6. #6
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Epic fail.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Another unhelpful and useless reply. What do you gain from this? What does the OP gain from this? Does everyone need to keep on repeating the obvious which has already been said?
    Stop this nonsense. It adds nothing to what has already been said and helps neither side.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    This is the wrong forum and the wrong place to dump homework. If you really want to know the answer to your question, get a compiler and test it or follow your lesson or textbook closely.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Objects as attributes of other objects.
    By kbro3 in forum C++ Programming
    Replies: 10
    Last Post: 08-15-2009, 03:46 PM
  2. Replies: 60
    Last Post: 12-20-2005, 11:36 PM
  3. Question about cout an stack object?
    By joenching in forum C++ Programming
    Replies: 8
    Last Post: 05-08-2005, 10:10 PM
  4. chain of objects within pop framework help needed
    By Davey in forum C++ Programming
    Replies: 0
    Last Post: 04-15-2004, 10:01 AM
  5. array of objects?
    By *~*~*~* in forum C++ Programming
    Replies: 4
    Last Post: 05-31-2003, 05:57 PM