Yuckie Classes

This is a discussion on Yuckie Classes within the C++ Programming forums, part of the General Programming Boards category; In apcs we use a class called bigint.h which is essentially a string of chars that can be used like ...

  1. #1
    Seņor Member
    Join Date
    Jan 2002
    Posts
    561

    Yuckie Classes

    In apcs we use a class called bigint.h which is essentially a string of chars that can be used like an integer (sort of). Its main problem is that it is EXTREMELY SLOW, and I think i can make a much more fast, effecient version. I think part of this is because it uses apvectors instead of built-in c arrays. I have a good basic understanding of classes (I have no problem creating simple ones), but it would make my life much easier if I knew how to use the operators (such as being able to say "instanceOfMyClass*=2; or instanceOfMyClass=8*7; and the !=, == operators...). How do I go about doing that (I see the syntax in bigint.h/cpp but since I havent seen it before I do not get a good understanding of it. Can anyone explain this to me or give me a link to someplace that can (I didn't see it on the tuts here).

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    It's called "operator overloading" and is quite a big topic. Search google for this term.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you Initialize all classes once with New?
    By peacerosetx in forum C++ Programming
    Replies: 12
    Last Post: 07-02-2008, 11:47 AM
  2. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-24-2004, 12:22 AM
  3. Exporting VC++ classes for use with VB
    By Helix in forum Windows Programming
    Replies: 2
    Last Post: 12-29-2003, 05:38 PM
  4. Prime Number Generator... Help !?!!
    By Halo in forum C++ Programming
    Replies: 9
    Last Post: 10-20-2003, 08:26 PM
  5. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 04:49 AM

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