Re: trouble with valarray and gcc 3.3
On Sep 9, 2004, at 9:17 PM, Doug McCoy wrote: -----start---- #include <valarray> 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----- I.e.: #include <valarray> int main() { // ... insert your code here. // ... the offending line is fine as a statement within a function. return 0; } Not an issue with Darwin GCC. 10Q. Joe _______________________________________________ darwin-development mailing list | darwin-development@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development Do not post admin requests to the list. They will be ignored. All other lines are fine as global variable declarations/initializations. The offending line doesn't belong at this scope. As an aside, I always use "c++" rather than "gcc" to drive the linker to make sure all the correct libraries and object files are brought in if at least one of the source files is a C++ source file (too lazy to try to supply all the right linker input manually :)
participants (1)
-
Joseph Kim