Creating new operators?

This is a discussion on Creating new operators? within the C++ Programming forums, part of the General Programming Boards category; Is it possible to create new operators with the operator function? Thanks!...

  1. #1
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949

    Creating new operators?

    Is it possible to create new operators with the operator function? Thanks!

  2. #2
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    You can make as many forms of operator() as you want, but apart from that, no. The compiler, after all, needs you to use a syntax it understands.

    Unless you mean overloading the operator "new", which you can do.
    Last edited by Cat; 07-24-2003 at 11:01 PM.

  3. #3
    eh ya hoser, got a beer? stumon's Avatar
    Join Date
    Feb 2003
    Posts
    323
    You can only overload existing operators.
    The keyboard is the standard device used to cause computer errors!

  4. #4
    *******argv[] - hu? darksaidin's Avatar
    Join Date
    Jul 2003
    Posts
    314

    Re: Creating new operators?

    Originally posted by Lurker
    Is it possible to create new operators with the operator function? Thanks!
    Not sure, if thats what you mean, but maybe you should givethis a try.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Bolean Operators hurt my head. (Trouble understanding) :(
    By Funcoot in forum C++ Programming
    Replies: 3
    Last Post: 01-20-2008, 06:42 PM
  3. Creating operators.....
    By Sentral in forum C++ Programming
    Replies: 7
    Last Post: 09-06-2006, 07:10 PM
  4. operators???
    By arjunajay in forum C++ Programming
    Replies: 11
    Last Post: 06-25-2005, 04:37 AM
  5. Creating and overloading new binary operators.
    By HolySmiter in forum C++ Programming
    Replies: 7
    Last Post: 02-24-2002, 12:08 PM

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