Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include "fmt/format.h"
- int main()
- {
- int hour = 17, minute = 42, second = 39;
- std::string result =
- fmt::format("Current time is {0:d}:{1:d}:{2:d}", hour, minute, second);
- std::cout << result << std::endl;
- // --> Current time is 17:42:39
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement