TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Len{at}Philpot.Org
from: Neil Heller
date: 2004-01-26 17:22:00
subject: Re: [C] Question about e

TO: LEN{at}PHILPOT.ORG


LP>Well... I understand what you're saying, and apparently 
LP>I've missed something (doh!) in my understanding of this. 
LP>I'm aware that I can't, e.g.,

LP>char text[12];
LP>text = "Some text";

You can, however, do

char text = "Some text";

Don't try to change text.

LP>Instead, I have to strcpy or similar to assign it. What I 
LP>was thinking that when I create a pointer to char, I can 
LP>effectively point it at a string literal I've created.

That's not defined in the C standard.  It may work with one compiler 
(Borland) and not with another (Microsoft).

LP>...although I'm not sure why I'd want to do that.

You seem to be a well-considered person.

þ CMPQwk 1.42 999

--- Maximus/2 3.01
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 633/267 270
@PATH: 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.