Re: passing a string to a C++ function



"Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote in message
news:uk9PrpOzFHA.2960@xxxxxxxxxxxxxxxxxxxxxxx
> Unfortunately, K&R style is in general horrible. There is nothing wrong
> with this particular line, but you should not take their code as example.

I don't agree. Before C++ came along it was the defacto standard. How can
you say they have bad style or are no good for examples? They invented the
language so who better to follow?

Ok, C++ came later and so follows different rules in lots of cases. But
seeing as it was based on C, I wondered why Straustrup chose a different
method to get a pointer into an array, since I assume that he was first to
do it in C++!

Loz.


.



Relevant Pages

  • Re: Looking for speed performance to draw line.
    ... each item in an array, that being the next and/or previous indexes. ... and it's next pointer to the previous item's original next pointer. ... Next -1, Prev 0 ... shapes up into shape classes that implemented the required commands ...
    (microsoft.public.vb.winapi.graphics)
  • Re: pointer value
    ... It is a pointer to an ... array of 10 ints. ... the broken "Reply" link at the bottom of the article. ... Prev by Date: ...
    (comp.lang.c)
  • Re: Array of class and a pointer to it
    ... arrays, and pointing to the object. ... m_pMyClass is not a pointer, but an array. ... Prev by Date: ...
    (microsoft.public.vc.language)
  • Re: dynamically allocating a 2d array
    ... its first element. ... int (*array)[X] which is a pointer to an array of X integers. ... Prev by Date: ...
    (comp.lang.c)
  • Re: volatile char
    ... >> pointer to a volatile LONG ... Loz. ... Prev by Date: ...
    (microsoft.public.vc.language)