I'm making C++ all over again!

This is a discussion on I'm making C++ all over again! within the C++ Programming forums, part of the General Programming Boards category; I'm making a HUGE library, (object-module), and in order to put the functions to use, I had to redefine every ...

  1. #1
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913

    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
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    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
    Perverted unanimous's Avatar
    Join Date
    Oct 2001
    Posts
    336

    Lightbulb c++

    C-- is already taken
    Give me a bad reputation!!!

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

  5. #5
    zen
    zen is offline
    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
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    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
    31173 h4x0r gnu-ehacks's Avatar
    Join Date
    Nov 2001
    Posts
    556
    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, 02: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, 08:37 AM

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