testingMadd
Programmer
void CJoelDlg::OnSave()
{
long countZero = 0;
long countTwo = 0;
for (h=0;h<bm.bmHeight;h++)
{
//for each width in every line until height is achieved
for (w=0;w<bm.bmWidth;w++)
{
if(bw[h][w]==0) countZero++;
if(bw[h][w]==255) countTwo++;
}
}
ofstream fout("Temp Bio.dat"
;
fout << countZero <<";" << countTwo;
fout.close();
MessageBox("values Saved"
;
CDialog::Invalidate();
}
i just cant seem to get this lines of code to store the values of the two arrays in a data file..... can anyone give me a suggestion of solution please????
{
long countZero = 0;
long countTwo = 0;
for (h=0;h<bm.bmHeight;h++)
{
//for each width in every line until height is achieved
for (w=0;w<bm.bmWidth;w++)
{
if(bw[h][w]==0) countZero++;
if(bw[h][w]==255) countTwo++;
}
}
ofstream fout("Temp Bio.dat"

fout << countZero <<";" << countTwo;
fout.close();
MessageBox("values Saved"

CDialog::Invalidate();
}
i just cant seem to get this lines of code to store the values of the two arrays in a data file..... can anyone give me a suggestion of solution please????