關於c++的file操作

codeblocks + c++ ifstream file(filename.c_str()) 可以通過 但是 已解決: 修改爲: c_str() 以const char 類型返回 string 內含的字符串 如果一個函數要求char*參數,可以使用c_str()方法:* string s = 「Hello World!」; printf("%s", s.c_str()); //輸出 「Hell
相關文章
相關標籤/搜索