From mboxrd@z Thu Jan 1 00:00:00 1970 From: richard@inf.ed.ac.uk (Richard Tobin) Date: Fri, 12 May 2017 15:04:45 +0100 (BST) Subject: [TUHS] C declarations. In-Reply-To: Ron Natalie's message of Thu, 11 May 2017 17:49:31 -0400 Message-ID: <20170512140445.EA5DD126E33E@macaroni.inf.ed.ac.uk> > The problem with that is that * doesn't really bind to the type name. > It binds to the variable. > > char* cp1, cp2; // cp1 is pointer to char, cp2 is just a char. > > I always found it confusing that the * is used to indicate an pointer > here, where as when you want to change an lvalue to a pointer, you use > &. The way to read it is that you are declaring *cp1 as a char. -- Richard -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.