examples/Demo.cpp
std::string locateDemoJavaScript()
{
   std::string  paths[3] = {
      "examples/Demo.js",
      "../examples/Demo.js",
      "../../examples/Demo.js"
   };
   
   for (int i = 0; i < 3; ++i)
   {
      std::ifstream file(paths[i].c_str());
      if (file.is_open())
         return paths[i];
   }
   
   return "";
}
/// Simple function that tries to locate the Demo.js file
Simple function that tries to locate the Demo.js file
Simple function that tries to locate the Demo . js file
std::string locateDemoJavaScript()
{
   std::string  paths[3] = {
      "examples/Demo.js",
      "../examples/Demo.js",
      "../../examples/Demo.js"
   };
   for (int i = 0; i < 3; ++i)
   {
      std::ifstream file(paths[i].c_str());
      if (file.is_open())
         return paths[i];
   }
   return "";
}
std :: string locateDemoJavaScript ( ) { std :: string paths [ 3 ] = { " " , " " , " " } ; for ( int i = 0 ; i < 3 ; ++ i ) { std :: ifstream file ( paths [ i ] . c_str ( ) ) ; if ( file . is_open ( ) ) return paths [ i ] ; } return " " ; }
Simple function that tries to locate the Demo.js file
Simple function that tries to locate the Demo . js file