Horje
stock a file in a vector cpp Code Example
stock a file in a vector cpp
#include<fstream> 
#include<vector> 
using namespace std; 
int main() 
{ 
	ifstream file; 
	string inputString; 
	vector<string> data; 
	file.open("/path/to/file"); 
	while(file>>inputString) //reads one string at a time 
		data.push_back(inputString); //add it to data vector 
	file.close(); 
}




Cpp

Related
ue log c++ unreal Code Example ue log c++ unreal Code Example
c++ nth substr Code Example c++ nth substr Code Example
c++ index of nth occurence Code Example c++ index of nth occurence Code Example
suppress individual warnings in visual c++ Code Example suppress individual warnings in visual c++ Code Example
C++ sqlite open file in other directory Code Example C++ sqlite open file in other directory Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10