[ create a new paste ] login | about

Link: http://codepad.org/zV8fbKgB    [ raw code | output | fork ]

C++, pasted on Jan 24:
#include <iostream>

class q
{
private:
    float x;
    float y;
    float z;
    float w;

public:
    q() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
    q(float x_, float y_, float z_, float w_) : x(x_), y(y_), z(z_), w(w_) {}

    q conj()
    {
        return q(-x, -y, -z, w);
    }
};

int main()
{
   std::printf("hello world");

    return 0;
}


Output:
1
hello world


Create a new paste based on this one


Comments: