Shows how to use xtd::source_location class.
#include <xtd/io/path>
#include <xtd/console>
#include <xtd/diagnostics/source_location>
void print_this_file_name() {
auto location = source_location::current();
console::write_line("File: {}", path::get_file_name(location.file_name()));
}
auto main() -> int {
print_this_file_name();
}
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd::io namespace contains types that allow reading and writing to files and data streams,...
Definition binary_reader.hpp:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10