This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Programming question--Reference parameters. Thanks
- From: Bob Koninckx <bob dot koninckx at mech dot kuleuven dot ac dot be>
- To: QiangHuang <jameshq at liverpool dot ac dot uk>
- Cc: Ecos-Discuss <ecos-discuss at sources dot redhat dot com>
- Date: 07 May 2003 11:33:33 +0200
- Subject: Re: [ECOS] Programming question--Reference parameters. Thanks
- Organization: KULeuven
- References: <ONEOIJPPOKNBBKJKCGLCMEJJCAAA.jameshq@liv.ac.uk>
You're doing it again!
This has nothing to do with eCos, so please ask this kind of questions
elsewhere. This kind of information can be found in _any_ book on C/C++.
Bob
On Wed, 2003-05-07 at 11:25, QiangHuang wrote:
> Hi all:
> I am using the arm-elf-gcc, I wonder whether I can use reference
> parameter in function. I tried this:
>
> void fun1(int &a)
> {
> // do somthing here
>
> }
>
> but seems the compiler can not recognize '&' here and report an error:
> "parse error before '&' token"
>
> so is reference parameter is not supported in arm-elf-gcc ?
>
> Thanks a lot.
--
----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering, tel. +32 16 322535
Machine Design and Automation fax. +32 16 322987
Celestijnenlaan 300B bob.koninckx@mech.kuleuven.ac.be
B-3001 Leuven Belgium http://www.mech.kuleuven.ac.be/pma
----------------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss