[SystemSafety] C++ and Pointers

Peter Bernard Ladkin ladkin at causalis.com
Wed Jun 5 15:46:11 CEST 2019


On 2019-06-05 15:39 , David Crocker wrote:
>>
> Yes, "int* iPtr1, iPtr2" is confusing. Very few C or C++ programmers would write that. 

Intentionally. They could be making a mistake or having finger trouble.

> However, int and int* are incompatible types, so the compiler would catch any attempt to use iPtr2 as a pointer. 

That is, "memory location" is the only strong data type in C++.

PBL

Prof. Peter Bernard Ladkin, Bielefeld, Germany
MoreInCommon
Je suis Charlie
Tel+msg +49 (0)521 880 7319  www.rvs-bi.de





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.techfak.uni-bielefeld.de/mailman/private/systemsafety/attachments/20190605/3d2ac2fb/attachment.sig>


More information about the systemsafety mailing list