int vs BIG INT

This is a discussion on int vs BIG INT within the C++ Programming forums, part of the General Programming Boards category; Hi! My teacher wrote a big int, and she wants me to compare it to an int but the thing ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    3

    Question int vs BIG INT

    Hi!

    My teacher wrote a big int, and she wants me to compare it to an int but the thing is I don't know all what an int can do.

    What are all the things an int can do?

    Here is what I managed to find out so far... am I missing anything?

    --

    unary operator + (value of argument)
    unary operator - (negate)

    binary operator + (addition)
    binary operator - (subtraction)
    binary operator * (multiplication)
    binary operator / (division)
    binary operator << (left shift)
    binary operator >> (right shift)
    binary operator += (addition with assignment)
    binary operator -= (subtraction with assignment)
    binary operator *= (multiplication with assignment)
    binary operator /= (division with assignment)
    binary operator <<= (left shift with assignment)
    binary operator >>= (right shift with assignment)
    unary operator ++ (increment [prefix])
    unary operator ++ (increment [postfix])
    unary operator -- (decrement [prefix])
    unary operator -- (decrement [postfix])
    binary operator % (modulus)
    binary operator = (assignment)
    unary operator ! (logical 'not')
    binary operator == (equality)
    binary operator != (inequality)

    --

    Thanks!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,489
    Theres a few more

    Bitwise
    & and
    | or
    ^ exclusive or
    and the corresponding assignment versions
    &=
    |=
    ^=

    Also bitwise not
    ~

    Relational operators
    < less than
    <=
    >
    >=

    Logical
    && and
    || or

    ints are also used in array subscripts [], but you could never declare an array big enough that it would take a bigint to subscript it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to combine these working parts??
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 02-01-2009, 07:19 AM
  2. Replies: 26
    Last Post: 11-30-2007, 02:51 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  5. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-01-2003, 11:26 PM

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