C/C++ objects

This is a discussion on C/C++ objects within the C# Programming forums, part of the General Programming Boards category; I have three objects in C and c++ A,B,C . will it be correct or not? explain with proper reason:- ...

  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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,411
    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
    Portugal
    Posts
    7,403
    - First post
    - Wrong forum
    - Homework question

    <clap><clap>
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    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
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,648
    Epic fail.

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,411
    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,139
    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, 10: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

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