Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =============proj3.cpp===============
- int main() {
- return 0;
- }
- /*#include "quaternion.h"
- int main (int argc, char *argv[])
- {
- quaternion
- a = quaternion (1),
- b = quaternion (2, 5, 3.2, -2.15),
- c = quaternion (0, -2.1, -0.34, 1.035);
- cout << "a " << a << " b " << b << " c " << c << endl;
- cout << "b+c: " << b + c << endl;
- cout << "c-b: " << c - b << endl;
- cout << "b*c: " << b * c << endl;
- cout << "c*b: " << c * b << endl;
- quaternion d = b / c;
- cout << "b/c: " << d << " (and ans * c: " << d * c << ")\n";
- cout << "Mess: " << a + b / c - (b-a) / (a + c) << endl;
- return 0;
- }
- */
- =======================quaternion.cpp======================
- #include "quaternion.h"
- #include <iostream>
- using namespace std;
- foo foo()
- {
- cout << "No arg was called";
- }
- foo::foo(int w=0, int x=0, int y=0, int z=0)
- {
- return w, x, y, z;
- }
- foo::foo(int a=0)
- {
- cout << "1 arg was called";
- }
- ================quaternion.h=================
- #ifndef QUATERNION_H
- #define QUATERNION_H
- class foo {
- public:
- foo();
- foo(int w, int x, int y, int z);
- foo(int a);
- private:
- int a, w, x, y, z;
- };
- #endif // QUATERNION_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement