/ ************************************************************************
*
* Purpose: Demonstrate the use of reference variables.
* Author: M J Leslie
* Date: 26-Oct-98
*
************************************************************************/
#include <stdio.h>
int Square(int &Val);
main()
{
int Number=10;
Square(Number);
printf("Number is %d\n", Number);
}
int Square(int &Val)
{
Val *= Val;
}
file: /Techref/language/ccpp/cppref/EXAMPLES/refvar.cc,
0KB, , updated: 1998年10月28日 13:39, local time: 2025年9月18日 16:00,
©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Questions?<A HREF="http://massmind.org/techref/language/ccpp/cppref/EXAMPLES/refvar.cc"> language ccpp cppref EXAMPLES refvar</A>
Did you find what you needed?
Welcome to massmind.org!
Welcome to massmind.org!
.