本当に大したことではないんですが、なぜno matching function to callのエラーが出るのかわかりません。
どなたかお願いします
# include <iostream> # include <fstream> # include <iomanip> using namespace std; ofstream ofile; void output(string); int main(int argc, char const *argv[]) { string outfilename; char strone; if (argc != 1) { cout << "Bad Usage: " << argv[0] << " read also output file on same line" << endl; exit(1); } else { outfilename = argv[1]; } cout << "Put the sentence here\n"; cin >> outfilename; //int float or double can be used scanf //cin is better ofile.open(outfilename); output (strone); return 0; } void output(string x) { int i; ofile << "RESULTS:" << endl; ofile << setiosflags(ios::uppercase); for( i=0; i < 10; i++) { ofile << setw(30) << x; } }
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。