Mail Archives: djgpp/1997/08/26/09:12:18
At 23:35 25/08/97 GMT, firewind wrote:
[snipped]
>> myHappy = "Hello, world!";
> ^^^^^^^^^^^^^^^^^^^^^^^^^^ (3)
[snipped]
>3: you're assiging a string to a variable, but this string really has no
> storage allocated for it.
>
This affirmation is incorrect! What this line of code does is to
_initialize_ the pointer myHappy with the address of the first element of
the constant array of char _"Hello, world!"_. Nothing particular wrong there.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak E-mail: csrabak AT ipt DOT br
DME/ASC Phone: 55-11-268-3522 Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax: 55-11-268-5996
Av. Prof. Almeida Prado, 532. Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Raw text -