Advertisement
Guest User

Untitled

a guest
Apr 13th, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. =============proj3.cpp===============
  2. int main() {
  3.  
  4. return 0;
  5. }
  6. /*#include "quaternion.h"
  7. int main (int argc, char *argv[])
  8. {
  9. quaternion
  10. a = quaternion (1),
  11. b = quaternion (2, 5, 3.2, -2.15),
  12. c = quaternion (0, -2.1, -0.34, 1.035);
  13. cout << "a " << a << " b " << b << " c " << c << endl;
  14. cout << "b+c: " << b + c << endl;
  15. cout << "c-b: " << c - b << endl;
  16. cout << "b*c: " << b * c << endl;
  17. cout << "c*b: " << c * b << endl;
  18. quaternion d = b / c;
  19. cout << "b/c: " << d << " (and ans * c: " << d * c << ")\n";
  20. cout << "Mess: " << a + b / c - (b-a) / (a + c) << endl;
  21. return 0;
  22. }
  23. */
  24. =======================quaternion.cpp======================
  25. #include "quaternion.h"
  26. #include <iostream>
  27. using namespace std;
  28. foo foo()
  29. {
  30. cout << "No arg was called";
  31. }
  32. foo::foo(int w=0, int x=0, int y=0, int z=0)
  33. {
  34. return w, x, y, z;
  35. }
  36. foo::foo(int a=0)
  37. {
  38. cout << "1 arg was called";
  39. }
  40. ================quaternion.h=================
  41. #ifndef QUATERNION_H
  42. #define QUATERNION_H
  43. class foo {
  44. public:
  45. foo();
  46. foo(int w, int x, int y, int z);
  47. foo(int a);
  48. private:
  49. int a, w, x, y, z;
  50. };
  51. #endif // QUATERNION_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement