Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
const integers
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Keith Thompson, post: 2476112"] I'm dropping the discussion of the hypothetical language change, but .... It's certainly not constant (in the sense used by the C standard), but it certainly is, or could be, const, i.e., read-only. The object "tmp" doesn't have its value modified after its initialization. The two calls to swap() create two distinct objects, both called "tmp". You could change int tmp = *x; to const int tmp = *x; and the compiler wouldn't complain. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
const integers
Top