Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdarg.h>
- template < int n >
- class Vec
- {
- private:
- float e[n];
- public:
- Vec(float e0, …) {
- va_list params;
- va_start(params, e0);
- e[0] = e0;
- for (int j = 0; j < n; ++j) {
- e[j] = (float)va_arg(params, double);
- }
- va_end(params);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement