Skip to content

Commit f112d19

Browse files
Update deprecation-warning.cpp (#10619)
Fixed Path Separator Handling for Cross-Platform Support (Windows File Systems)
1 parent 1da7b76 commit f112d19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/deprecation-warning/deprecation-warning.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main(int argc, char** argv) {
1212
}
1313

1414
// Get only the program name from the full path
15-
auto pos = filename.find_last_of('/');
15+
auto pos = filename.find_last_of("/\\");
1616
if (pos != std::string::npos) {
1717
filename = filename.substr(pos+1);
1818
}

0 commit comments

Comments
 (0)