did you try to compile this small code?
bob
--- On Tue, 10/28/08, Tyler Littlefield <[EMAIL PROTECTED]> wrote:
From: Tyler Littlefield <[EMAIL PROTECTED]>
Subject: Re: [c-prog] Newbie Newbie C question
To: [email protected]
Date: Tuesday, October 28, 2008, 5:15 PM
hello,
What are you assigning the array as?
For example, what is it's declaration?
Here's a quick example:
#include <string>
int main(void)
{
string arr[2];
arr[0]="Hello" ;
r[1]="World! ";
return 0;
}
HTH,
Thanks,
Tyler Littlefield
email: [EMAIL PROTECTED] com
web: tysdomain-com
Visit for quality software and web design.
skype: st8amnd2005
----- Original Message -----
From: Andre Fecteau
To: [EMAIL PROTECTED] com
Sent: Tuesday, October 28, 2008 4:07 PM
Subject: [c-prog] Newbie Newbie C question
Hello Everyone,
I'm really new to c programming, so bear with my simple question. I'm a
Perl programmer, who has just started learning C(not even experienced
at Perl). I can get around and usually manage through lots of work to get
what I need done, done! In Perl I can assign a string to an array element.
ex: $array[0] = "example";
In C it seems that you can only assign an individual letter to each element.
ex: array[0] = 'c';
Whenever I try to do what I do in Perl all the time, in c I get compile
errors. What am I doing wrong?
Can I even do this in c?
If you can't do that in c, that's OK. It's just really convenient to do it
the Perl way!
Thanks,
Andre
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]