From: Sam Moore Date: Wed, 26 Mar 2014 08:33:02 +0000 (+0800) Subject: ipdf.h and Real type X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e24f0693b4e3989e625448009175c06e1e6e08d4;p=ipdf%2Fcode.git ipdf.h and Real type Real == float for now. Can make a class and overload it later. Naming convention: void ThisIsAFunction(Type this_is_a_var); --- diff --git a/src/ipdf b/src/ipdf new file mode 120000 index 0000000..f5811ab --- /dev/null +++ b/src/ipdf @@ -0,0 +1 @@ +../bin/ipdf \ No newline at end of file diff --git a/src/ipdf.h b/src/ipdf.h new file mode 100644 index 0000000..33962d6 --- /dev/null +++ b/src/ipdf.h @@ -0,0 +1,11 @@ +#ifndef _IPDF_H +#define _IPDF_H + +namespace IPDF +{ + typedef float Real; + inline float RealToFloat(Real r) {return r;} +} + + +#endif //_IPDF_H diff --git a/src/main.cpp b/src/main.cpp index e683564..5b8d4b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,14 @@ #include "common.h" +#include "ipdf.h" + +using namespace std; +using namespace IPDF; + int main(int argc, char ** argv) { - Debug("It's alive!"); + Real a = 10; + Real b = 20; + Debug("a*b = %f", RealToFloat(a*b)); return 0; }