--- Thomas Hruska <[EMAIL PROTECTED]> wrote:

> sunil_h_v wrote:
> > hey guys why dont you use pointers???
> > i tried it works fine with me
> > 
> > #include <stdio.h>
> > #include <conio.h>
> > #include <string.h>
> > #include <alloc.h>
> > void fun(char **arr)
> > {
> >   printf("%s\n",arr[0]);
> >   printf("%s\n",arr[1]);
> > }
> > void main()
> > {
> >   char **arr;
> >   clrscr();
> >   strcpy(arr[0],"1asdf");
> >   strcpy(arr[1],"2sdf");
> >   fun(arr);
> >   getch();
> > }
> 
> Because most of us have realized the benefits of C++
> and don't really 
> mess with anything but pass-by-address any more and
> use high level 
> templates/classes that cover over the messy stuff.
> 
> What's really amazing is your program didn't crash,
> wipe your hard 
> drive, display gobbledygook, or complain that your
> compiler is ancient 
> and you should upgrade*.  You are dereferencing
> memory that hasn't been 
> allocated with malloc().
> 
> * You need to find a new compiler.  TC 3 is ancient.
>  Both Microsoft and 
> Borland are giving away their latest stuff (albeit
> slightly cut down - 
> but _way_ more functionality than you are using
> right now).

> * You need to find a new compiler.  TC 3 is ancient.

Maybe upgrade Zortech Compiler (grin).





 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

Reply via email to