home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:19454 comp.lang.c++:18863
- Newsgroups: comp.lang.c,comp.lang.c++
- Path: sparky!uunet!UB.com!pippen.ub.com!rfries
- From: rfries@sceng.ub.com (Robert Fries)
- Subject: Re: Dynamic Mem Help
- Message-ID: <rfries.164@sceng.ub.com>
- Sender: news@pippen.ub.com (The Daily News)
- Nntp-Posting-Host: 128.203.1.151
- Organization: Ungermann Bass
- References: <93007.230524U10139@uicvm.uic.edu> <rfries.159@sceng.ub.com> <1993Jan8.205809.7661@klaava.Helsinki.FI>
- Date: Fri, 8 Jan 1993 21:45:34 GMT
- Lines: 30
-
- 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.
-
- Robert
-
- //////////////////////////////////////////////////////////////////////////
- Robert Fries
- Ungermann-Bass Inc.
-
- DISCLAIMER:
- Opinions contained herein are my own, and are not necessarily those
- of Ungermann-Bass.
- //////////////////////////////////////////////////////////////////////////
-