Re: trouble with valarray and gcc 3.3
Re: trouble with valarray and gcc 3.3
- Subject: Re: trouble with valarray and gcc 3.3
- From: Jerry Pendergraft <email@hidden>
- Date: Thu, 9 Sep 2004 23:40:49 -0500 (CDT)
err - maybe a cut and paste kinda error but line 2 of the code example:
int main{
changed to:
int main(){
seems to fix the problem?
--
Jerry Pendergraft email@hidden
Endocardial Solutions voice: 651-523-6935
1350 Energy Lane, Suite 110 fax: 651-644-7897
St Paul, MN 55108-5254 mobile: 651-491-0163
On Thu, 9 Sep 2004, Doug McCoy wrote:
> On Sep 9, 2004, at 9:58 PM, Joseph Kim wrote:
>
>
> thanks for the quick reply. my bad on that. but the problem still exists.
>
> ----code----
> #include <valarray>
> int main{
> std::valarray<int> v1; // construct an empty valarray
> std::valarray<int> v2(1,3); // construct a valarray of three
> // elements, all initialized to 1
> v1.resize(3,2); // resize the first valarray to three
> // elements, all initialized to 2
> std::valarray<int> v3(v1); // v3 gets a copy of v1's elements.
> }
> ---end---
>
> and
>
> ---errors---
> test.cpp:2: error: syntax error before `{' token
> test.cpp:6: error: syntax error before `.' token
> test.cpp:8: error: `v1' was not declared in this scope
> test.cpp:9: error: parse error before `}' token
> ---end---
>
> still having trouble.
>
> ???
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> darwin-development mailing list | email@hidden
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.