c++ cZar
Showing posts with label
semantics
.
Show all posts
Showing posts with label
semantics
.
Show all posts
Wednesday, September 1, 2010
Initialising and assignment
int i =5;
i=5;
const int i =5;
int &r = i;r = 10;
Assignment can happen anywhere while initialization occurs once.
Its const which creates this difference. We can think reference as const pointers.
Java has final like this.
Older Posts
Home
Subscribe to:
Posts (Atom)