Update deprecation-warning.cpp

Fixed Path Separator Handling for Cross-Platform Support (Windows File Systems)
This commit is contained in:
aryantandon01 2024-11-30 17:35:37 +05:30
parent 3e0ba0e604
commit a448fc071e

View file

@ -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);
}