×
  • Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
 

Computer notes - The const Keyword

by on Dec 28, 2011

  • 601 views

The answer is that, yes, we don’t want the function to change the parameter, but neither do we want to use up time and memory creating and storing an entire copy of it. So, we make the original ...

The answer is that, yes, we don’t want the function to change the parameter, but neither do we want to use up time and memory creating and storing an entire copy of it. So, we make the original object available to the called function by using pass-by-reference. We also mark it constant so that the function will not alter it, even by mistake.

Statistics

Views

Total Views
601
Views on SlideShare
601
Embed Views
0

Actions

Likes
0
Downloads
31
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via SlideShare as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
Post Comment
Edit your comment

Computer notes - The const Keyword Computer notes - The const Keyword Presentation Transcript