Using C++ to get HTML

Is there a way for me to use C++ to open page 1, page 2, page 3 of a website that's named like test.com/1.html, test.com/2.html, etc. and take line X of each page's source code (Line X stays the same for all of them), to take characters 5-8 in that line, and then to make it a table or something like that? Thanks.
use curl or smth to get the page; than just parse it like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
parse(char *line, char *dest) {

while (i < X) {
if (*line == "\n") {
if (*(line + 1) == "\r") {
++i;
}
line++;
}

if (strncpy(dest, line, strlen(line))) {
return 0;
}
return 1;
}

int copy(char *line, char *dest) {
if (strncpy(dest, line + 5, 3)) {
return 0;
}
return 1;
}
Last edited on
Topic archived. No new replies allowed.