Walt Mankowski via plug on 20 Feb 2024 06:59:48 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Arduino Syntax Questions


On Mon, Feb 19, 2024 at 10:09:44PM -0500, Will via plug wrote:
> Casey,

> This is basic C and C++ here.

> 1.) `->` is a operator to allow you to set a value from within a struct.

That's not correct. The -> operator is used to dereference pointers. The pointer can be to either a struct or a scalar value like an int or a char.


The operator to access values within a struct is . (period). It can also be used to both get and set values.

Walt

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug