stuck on webscraping and arrays

I am trying to complete a function that takes info from a string, that has been taken from a web page(this part is completed), and then puts the strings into multiple arrays. The code from the website is:
<h4>Eastern Michigan University</h>
<small>Ypsilanti, Michigan</small>
<td class="tuition">$19,700</td>
<td class="size">18,914</td>
<td class="years">4 Year</td>
<td class="type">Public</td>

The part of the code that I have done is
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
webpage =      getPageContents("Source.htm");

	

	begTag = "<td class=\"tuition\">";
	endTag = "</td>";
	

	
	beg = webpage.find(begTag, beg);

	while(beg != -1){
		
		beg += begTag.length();
		end = webpage.find(endTag, beg);

		
		len = end - beg;

          
		cout << webpage.substr(beg, len) << endl;

	
		beg = end + endTag.length();
		beg = webpage.find(begTag, beg);
	}

I need to take the information for each tag and also for about 64 other colleges, any help would be appreciated.
Thanks
Last edited on
Topic archived. No new replies allowed.