Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Pointer incompatible type assignment to character.

Thread Tools

Pointer incompatible type assignment to character.

Peter Shaggy Haywood
Posts: n/a
Groovy hepcat Removed) was jivin' on 19 Apr 2006
20:54:38 -0700 in comp.lang.c.
Re: Pointer incompatible type assignment to character.'s a cool scene!
Dig it!

>Integer arrays cannot be assigned strings, you can assign one character
>at a time to the array--
>like arr[0]='l';
> arr[1]='a';
>Because when characters are assigned to integers, theri ascii value
>gets transferred, but the ascii value of strings cannot be calculated.

What on Earth are you talking about? Without seeing any quoted text,
it's hard to know what you're trying to say; especially when what
you've written is unclear in itself.
Now, as to what you said, it's bunk. An array of char is an "integer
array", since char is an integer type. And you certainly can
initialise an array of char with a string literal. And EBCDIC based
implementations don't use ASCII. Nor do implementations that use other
non-ASCII character sets. And just what is "the ascii value of
strings" supposed to mean? Do you mean the values of the characters in
a string? Why would you want to calculate their values? You can,
though, should the need arise.


Dig the even newer still, yet more improved, sig!
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
incompatible pointer assignment Prathamesh Kulkarni C Programming 7 12-10-2012 03:38 PM
assignment from incompatible pointer type Bart Vandewoestyne C Programming 2 04-27-2010 02:00 PM
assignment from incompatible pointer type Olaf \El Blanco\ C Programming 1 06-10-2006 04:48 PM
initialization from incompatible pointer type Brian Stubblefield C Programming 3 05-27-2004 01:31 PM
incompatible pointer assignment ? zmbdcqnrdfetnws C Programming 8 12-06-2003 04:52 AM