What happens if...?

This is a discussion on What happens if...? within the C++ Programming forums, part of the General Programming Boards category; What happens if you, the programmer, or the user of the program, either intentionally or accidentally attempt to store a ...

  1. #1
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827

    Talking What happens if...?

    What happens if you, the programmer, or the user of the program, either intentionally or accidentally attempt to store a value greater than an int type is able to handle? For example, say you had an int with byte size 4 bytes, and you attempted to store a value that could not fit inside 4 bytes only (i.e. it needs more bytes). What would happen?

  2. #2
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Didn't you just ask this question?
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  3. #3
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827
    Yep, sorry my bad. Accidental double-post due to internet connection problems.

Popular pages Recent additions subscribe to a feed

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