ofstream, how do I send it an unsighned long value?

the library i'm using sends data to my SD card with some type of stream function. The code without the library looks like this.

ofstream sdout(name, ios::out | ios::app);
sdout << "line " << int(j) << " of pass " << int(i);
sdout << endl;

j and i were initialized to make a nested loop. My question is how do you cast to and unsigned long?

all I see on the reference page is long(). Is it possible?

The long is a light to frequency counter using an interrupt. I really need the unsigned long because daylight has a huge number compared to the indoor light and I don't feel like making a frequency divider with J-K flip flops.

Penny for your thoughts?

eh, hopefully -2,147,483,648 to 2,147,483,647 will work.

Did you try google?

"C cast" gave good results.