Thread: I'm making C++ all over again!

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912

    I'm making C++ all over again!

    I'm making a HUGE library, (object-module), and in order to put the functions to use, I had to redefine every data type. It wasn't that hard, because I just made a class, and the only data member is an instance of the primitive data type. Most of the operators I can do, but I need to know one thing. I'm now going to overload the equality ( < > == <= >=) operators. Now in the function for the operator, if the condition is true, what do i return to make the if statement work. if it's false? And how would I handle the operator for dereferencing?

    Thanks in advance if you can help, I hate you if you can't (nothing personal, I just don't like you!)

  2. #2
    Somebody should make one that takes all the weird names and give them good names. Now some of the weird names are OK, but some of them, you have to look up just to see what it is. It should be called C++ SE.

    But then again, it would cause a lot of confusion to experienced C++ programmers. It would however, help the newbies out a bit. I'll think of the name it should be given. C--, no that means C down 1...umm......C+2, na that sounds corny......... C-orny! that what I'll call it! lol

  3. #3

    Lightbulb c++

    C-- is already taken

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Thanks. Your input that was actually related to the subject was nonexistent and helped a lot.

  5. #5
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Now in the function for the operator, if the condition is true, what do i return to make the if statement work. if it's false?
    Normally it's one (or non-zero) for true and zero for false.

    And how would I handle the operator for dereferencing?
    Returning the value stored at the memory location specified in the argument.
    zen

  6. #6
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    No offence - but what is the point of rewriting C++,
    isnt that what java did and look at that! Its not as if the coding structures are being highly optomized - just renamed in effect.
    Monday - what a way to spend a seventh of your life

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    i did it because some of my functions would have been ideal if written as operators, which you can only make as class members. So i rewrote classes just like the data types. That, and I have no life.

  8. #8
    How long did it take?
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. making sprites
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 02-20-2010, 07:00 AM
  2. Making great graphics
    By MadCow257 in forum Game Programming
    Replies: 1
    Last Post: 02-20-2006, 11:59 PM
  3. Making control...
    By Finchie_88 in forum C++ Programming
    Replies: 2
    Last Post: 09-07-2004, 01:42 PM
  4. Replies: 2
    Last Post: 01-13-2003, 01:28 PM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 07:37 AM