operators in c++

This is a discussion on operators in c++ within the C++ Programming forums, part of the General Programming Boards category; i need your help to understand how operators(operator+,operator*...) are used?and what are they used for??...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    80

    Post operators in c++

    i need your help to understand how operators(operator+,operator*...) are used?and what are they used for??

  2. #2
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    those 2 above are called addition and multiplication operators. You probably covered them in junior school, for example:

    1 + 1 = 2 //note the + operator

    But seriously, if you mean overloaded operators they are used in the same way but you need to define them for your own classes. Search the boards there's probably dozens of examples of operator overloading

    Edit : I found an example or 3

    1

    2

    3
    Last edited by endo; 09-05-2002 at 08:48 AM.
    Couldn't think of anything interesting, cool or funny - sorry.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Logical Operators in C++
    By Flecto in forum C++ Programming
    Replies: 4
    Last Post: 05-15-2009, 08:17 AM
  2. Bolean Operators hurt my head. (Trouble understanding) :(
    By Funcoot in forum C++ Programming
    Replies: 3
    Last Post: 01-20-2008, 07:42 PM
  3. operators???
    By arjunajay in forum C++ Programming
    Replies: 11
    Last Post: 06-25-2005, 05:37 AM
  4. Operators
    By George in forum C++ Programming
    Replies: 3
    Last Post: 04-02-2003, 07:35 PM
  5. operators operands
    By verb in forum C Programming
    Replies: 6
    Last Post: 02-13-2002, 07:04 PM

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