C++ build - namespace and no member -


i have code:

mymathutils.h

#ifndef my_math_utils_h #define my_math_utils_h   #include "./ray.h" #include "./raytriangleresult .h" #include "./triangle.h"  namespace mymath  {       class mymathutils      {         public:             static bool raytriangleintersection(const mymath::ray & ray, const mymath::triangle & t, mymath::raytriangleresult * out);         //other code     }; } #endif 

and triangle.h

#ifndef my_triangle_h #define my_triangle_h  namespace mymath {     struct triangle     {        //code     }; } #endif 

but during compile, have got error:

d:\c++\c++\mymath\header./mymathutils.h(71): error : namespace "mymath" has no member "triangle" static bool raytriangleintersection(const mymath::ray & ray, const mymath::triangle & t, mymath::raytriangleresult * out);

i using intel c++ 15.0 compiler


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -