Explorar o código

Update deprecation-warning.cpp (#10619)

Fixed Path Separator Handling for Cross-Platform Support (Windows File Systems)
aryantandon01 hai 1 ano
pai
achega
f112d198cd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/deprecation-warning/deprecation-warning.cpp

+ 1 - 1
examples/deprecation-warning/deprecation-warning.cpp

@@ -12,7 +12,7 @@ int main(int argc, char** argv) {
     }
 
     // Get only the program name from the full path
-    auto pos = filename.find_last_of('/');
+    auto pos = filename.find_last_of("/\\");
     if (pos != std::string::npos) {
         filename = filename.substr(pos+1);
     }