c++ output html problem

Hi, I'm working on a project where I'm supposed to get the input from a txt file that contains the population of every city in the state listed alphabetically.
I have to get the input and then create a html file that will organize that info into a web page.

I got through most of it but one of the requirements is to have the city and population color coded in a alternate sequence.
Here is how it's supposed to come out:
http://imageshack.us/photo/my-images/856/unledpzz.png/

I wanted help on doing that sequence with the alternating color since I'm stumped.

any and all help is appreciated, thanks.
Last edited on
Figured it out.

Here's how to do it if someone had a similar problem.

int num1 = 1;
int num2 = 0;

if (num1 > num2)
{
outFile << "<tr class=lightBlue><td>" << city << "</td><td>" << population << "</td></tr>" << endl;
num2 += 2;
}
else
{
outFile << "<tr class=lightYellow><td>" << city << "</td><td>" << population << "</td></tr>" << endl;
num1 +=2;
}
Topic archived. No new replies allowed.