array to pointer decay question !!

From: m sergei (sergei_m_1_at_yahoo.com)
Date: 06/30/04


Date: 30 Jun 2004 06:29:39 -0700

main(int argc, char *argv[])

the second parameter to function main takes a pointer to an array.

can we also write it in terms of a reference rather than a pointer ?
an example of using (usage) as a reference would be helpful



Relevant Pages

  • Re: assert
    ... reference class instances the array can only contain pointers to the ... classes that are internally default public): reference classes and value ... via just its pointer. ... static void Assert(bool condition) ...
    (microsoft.public.dotnet.languages.vc)
  • Re: "Must instantiate controlled types at library level." Why?
    ... > The array bounds become unknown. ... > just the size of an pointer. ... It also show that operators attached to a reference type act ... > the compiler will stop creating copy constructors and warn you if you ...
    (comp.lang.ada)
  • Re: Question on LSP
    ... Sure, the developer must keep track of which type has been assigned to each pointer to manage complexity in creating the design, which is why the 'T' is in T*. ... Subtyping is a relation which does not ... Those object types are completely orthogonal to the semantics of being an object reference. ... aggregate references, is the aggregate of referenced objects or target ...
    (comp.object)
  • Re: assert
    ... value class valClass ... create the array POINTER. ... by passing JUST the pointer to rc it has virtually passed ... classes that are internally default public): reference classes and value ...
    (microsoft.public.dotnet.languages.vc)
  • Re: pass an array throuh a function
    ... >Doesn't this just demonstrate a way of using a reference ... >to the pointer. ... You have still not passed the actual array ... If you call show2 passing an actual, honest-to-goodness float *, however ...
    (alt.comp.lang.learn.c-cpp)