如果我想編寫自己的test.cpp來檢查另一個.cpp文件是否以我希望輸出的方式輸出,是否有沒有明確地打印它? 換句話說,就是那裏 assert(output_of_file_being_tested, "this is the correct output");
任何這樣的地方output_of_file_being_tested是什麼,應該是「COUT」主編。
如何打印std::regex的字符串表示形式? 說我有圖案的集合,我想打印相匹配的第一個: std::vector<std::regex>> patterns = Get();
for (auto pattern: patterns){
if (std::regex_match("file.txt",pattern)){
std::cout << "matched on pa