home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:19527 comp.lang.c++:18926
- Path: sparky!uunet!wupost!waikato.ac.nz!comp.vuw.ac.nz!acheron.amigans.gen.nz!alien
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: Dynamic Mem Help
- Message-ID: <alien.02ff@acheron.amigans.gen.nz>
- From: alien@acheron.amigans.gen.nz (Ross Smith)
- Date: 10 Jan 93 12:12:06 GMT+12
- References: <93007.230524U10139@uicvm.uic.edu> <rfries.159@sceng.ub.com> <1993Jan8.205809.7661@klaava.Helsinki.FI> <rfries.164@sceng.ub.com>
- Distribution: world
- Organization: Muppet Labs
- Lines: 34
-
- In article <rfries.164@sceng.ub.com> rfries@sceng.ub.com (Robert Fries) writes:
- >In article <1993Jan8.205809.7661@klaava.Helsinki.FI> wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) writes:
- >
- >>rfries@sceng.ub.com (Robert Fries) writes:
- >>>You'll have to use an explicit cast of this value to
- >>>assign it to a variable of type 'char *', e.g.:
- >>>
- >>> str = (char *)calloc(10, sizeof(char));
- >
- >>This is required in C++ only, not in ANSI C.
- >
- >>In ANSI C no casts are needed when assigning a "void *" to a pointer
- >>to any data type (not including pointers to functions), or the other
- >>way around.
- >
- >>--
- >>Lars.Wirzenius@helsinki.fi (finger wirzeniu@klaava.helsinki.fi)
- >> MS-DOS, you can't live with it, you can live without it.
- >
- >Oops, you're absolutely right.
-
- About what? C or MS-DOS?
-
- :-)
-
- --
- ...... Ross Smith (Wanganui, NZ) ...... alien@acheron.amigans.gen.nz ......
-
- "I blame you for the moonlit sky and the dream that died with the Eagle's flight
- I blame you for the moonlit nights when I wonder why are the seas still dry
- Don't blame me, sleeping satellite" (Tasmin Archer)
-
- --
-
-