Re: why use -> (not .) with pointers?



In article <da172g$2cp$1@xxxxxxxxxxxxxxxxxxxxxxx>,
Richard Tobin <richard@xxxxxxxxxxxxxxx> wrote:
>
>Is it a disaster that if foo is a function
>pointer you can say foo(1) instead of (*foo)(1)?

Of course it is. Clearly, the syntax for a call through a function
pointer should be foo->(1).
--
7842++
.



Relevant Pages

  • Re: verknuepfte liste umdrehen
    ... its expression in the syntax of declarations. ... several into an array, yields it from a function, or ... is a pointer to it. ... declare an integer, a pointer to an integer, a pointer to a ...
    (de.comp.lang.c)
  • Re: Request for code sample re OutputCleanpoint
    ... difficultry getting the data and syntax correct: ... Second is to call the method SetProperty of this interface and three things ... The pointer to the buffer and the length of the pointer or the buffer .. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Maybe something to vote for...
    ... IMO, if the syntax can't handle everything in a coherent fashion, then ... You dont have to ... overwrite a variable. ... the pointer also. ...
    (borland.public.delphi.non-technical)
  • Re: Pointers In VS2005
    ... XmlDocument^ J = new XmlDocument; ... For this reason it's possible to lock a managed handle for a brief period of time, using the pin_ptr syntax: ... A pin_ptr can be treated as an unmanaged pointer, ... So instead of getting a pointer to a handle, you grab a reference to it. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: How do I expose a static_cast?
    ... David ... >> however, due to this being a static cast, what is the syntax? ... > The A part of B objects is private, ... you cannot convert a B pointer into an A pointer. ...
    (comp.lang.cpp)