Date: Sun, 20 Feb 2005 00:17:31 +0100 From: Anthony Atkielski <atkielski.anthony@wanadoo.fr> To: freebsd-questions@freebsd.org Subject: Re: c++ Message-ID: <675354920.20050220001731@wanadoo.fr> In-Reply-To: <ef60af0905021915074e5d2929@mail.gmail.com> References: <ef60af09050219015116024f83@mail.gmail.com> <5b8472dd5925a0b0b59f15cd9f8e15f3@shire.net> <ef60af0905021915074e5d2929@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Gert Cuykens writes: > What does coercing mean ? Telling the compiler to disregard mismatches between data types. Normally, if you put an integer in a program where a character pointer is required, the compiler will complain. If you use a cast to coerce the type of the integer to a character pointer, the compiler will let it pass, and will treat the integer as a pointer (whether it really contains a pointer or not). > Why does the compiler have to match parameters ? To help avoid errors in coding, the compiler makes sure that the type of a variable matches what is expected in certain situations. > PS what is the difference between ? > A=*data The contents of the memory location pointed to by data is copied to A. > A=data The value of data is copied to A. > A=&data The address in memory of data is copied to A. -- Anthony
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?675354920.20050220001731>