From a448fc071e13014f3606d0478b0241fe22cbc846 Mon Sep 17 00:00:00 2001 From: aryantandon01 Date: Sat, 30 Nov 2024 17:35:37 +0530 Subject: [PATCH 1/2] 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); } From 550f4f0b0e74b98f4cc3cd7cfce0fae307623f80 Mon Sep 17 00:00:00 2001 From: aryantandon01 Date: Mon, 2 Dec 2024 09:36:05 +0530 Subject: [PATCH 2/2] Update deprecation-warning.cpp --- 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 cd79f0ac8..c2958ea12 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); }