書き途中のファイル入力プログラムなのですが関数呼び出しのところでエラー出てしまったのですが、何がいけないのか教えてほしいです
c++
1#include <iostream> 2#include <fstream> 3#include <sstream> 4#include <vector> 5#include <string> 6 7using namespace std; 8 9int i(0),x; 10 11 12void read_f(const string uho,vector<string> &uhokun){ 13 14 ifstream ifs(uho); 15 16 if(!ifs){ 17 cout << uho << "file no exist" << endl; 18 return ; 19 } 20 string str; 21 while(getline(ifs,str,'\n')){ 22 uhokun.push_back(str); 23 i++; 24 } 25 ifs.close(); 26} 27int main(){ 28 29 cin >> x; 30 read_f();????ここ 31 for(int j(0);i != j;j++){ 32 cout << uhokun.bigin() + j << endl; 33 } 34}
PS C:\Users\BEIKE\cpp> g++ .\uho16.cpp .\uho16.cpp: In function 'int main()': .\uho16.cpp:30:12: error: too few arguments to function 'void read_f(std::__cxx11::string, std::vector<std::__cxx11::basic_string<char> >&)' read_f(); ^
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/10/08 14:39 編集