From a448fc071e13014f3606d0478b0241fe22cbc846 Mon Sep 17 00:00:00 2001 From: aryantandon01 Date: Sat, 30 Nov 2024 17:35:37 +0530 Subject: [PATCH] Update deprecation-warning.cpp Fixed Path Separator Handling for Cross-Platform Support (Windows File Systems) --- examples/deprecation-warning/deprecation-warning.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/deprecation-warning/deprecation-warning.cpp b/examples/deprecation-warning/deprecation-warning.cpp index 11b35d2c2..cd79f0ac8 100644 --- a/examples/deprecation-warning/deprecation-warning.cpp +++ b/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); }