Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!littlei!intelhf!watson!ajw From: ajw@watson.hf.intel.com (Alan Waldock) Newsgroups: comp.lang.c++ Subject: const vs. void Message-ID: <1991Mar20.164518.19928@intelhf.hf.intel.com> Date: 20 Mar 91 16:45:18 GMT Sender: news@intelhf.hf.intel.com (News User) Reply-To: ajw@watson.hf.intel.com Organization: Intel Development Tools Operation, Hillsboro, OR Lines: 15 Originator: ajw@watson Nntp-Posting-Host: watson This is a kind of repost, on account of our mail servers are up the creek. If, to protect data, I point to it with a 'char const *', the compiler prevents me from using that pointer as the first (destination) argument to 'strncpy()', which requires a 'char *'. However, I'm free to pass it (as destination) to 'memcpy()', which specifies a 'void *' as its first argument. It's as if a 'void *' will accept any pointer, const or no. Is this right? -- Alan Waldock, from but not on behalf of Intel Corporation ajw@watson.hf.intel.com ...uunet!intelhf!watson!ajw