(1) Đọc từng dòng của một file text vào một mảng các string, bỏ qua dòng trống
// read_line.cpp
// read all lines of a text file into an array of strings
#include <iostream>
#include <fstream>
#include <cstring>
#include <vector>
using namespace std;
// remove space after the string s
void rtrim(char *s)
{
unsigned int len = strlen(s);
while (len > 0 && s[len-1] == ‘ [...]
Filed under: C Plus Plus, Thư viện code | Leave a Comment »