Update deprecation-warning.cpp
Fixed Path Separator Handling for Cross-Platform Support (Windows File Systems)
This commit is contained in:
parent
917786f43d
commit
496d4efeee
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get only the program name from the full path
|
// 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) {
|
if (pos != std::string::npos) {
|
||||||
filename = filename.substr(pos+1);
|
filename = filename.substr(pos+1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue