Answer Posted / hrpynux@gmail.com
When a variable is declared as a reference, it becomes an alternative name for an existing variable. A variable can be declared as a reference by putting '&' in the declaration.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are built-in functions? What is the syntax for the definition?
What is a syntax in c++?
Is it possible to get the source code back from binary file?
What are the advantages of using pointers in a program?
Can I learn c++ without c?
What is this weird colon-member (" : ") syntax in the constructor?
Why do we need templates?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new? What is the purpose of the "delete" operator? On throwing an exception by the animal constructor in p = new animalq, can memory leak occur? What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages? Which is not a valid keyword
a) public
b) protected
c) guarded What are abstract data types in c++? What do nonglobal variables default to
a) auto
b) register
c) static