Asad Abbas wrote:
> 
> Hi All,
> 
> While dealing with functions in C++ .
> Generally, the C++ convention is the call-by-value. An exception is where 
> arrays are passed as arguments,
> Arrays are called by reference by default.
> 
> Is ther any way to pass the arrays  to the functions by value rather than 
> reference?
> 
> Regards,
> Asad Abbas
> Pakistan,

Templates can be passed by value.  Using std::vector<> or Block<> would 
do the trick.

However, depending on use, you may also consider doing a 'const &', 
which passes by reference but is read-only.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to