Original Post
Dear All, How is it possible to create an array using vector for a class with aligned variables like __m128 in Visual Studio .NET. I do something like this.... #pragma once #include #include #include #include #define CACHE_ALIGN __declspec(align(16)) struct CACHE_ALIGN S1 { __m128 a; }; void main() { std::vector< S1 > tempo; } which gives me an error like this: testAlignment.cpp C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(507) : error C2719: '_Val': formal parameter with __declspec(align('16')) won't be aligned testAlignment.cpp(23) : see reference to class template instantiation 'std::vector<_Ty>' being compiled with [ _Ty=S1 ] Can n e one help me with this.... Thanks A lot in Advance, R