stupid question about arrays
if i have an array such as:
unsigned short m_usArray[1000];
and i fill it up with unsigned shorts, is there away i can write the entire array to a file with just one command instead of doing something like:
ofstream ("file.txt");
for( int i = 0; i < 1000; i++ )
{
fout << m_usArray[i];
}
fout.close();
?
cheers, bigdaz
Re: stupid question about arrays
Hi,
to answer your question, maybe :-) If there were a command
out there, please tell me how you would want it to look.
My guess would be:
WriteArrayToFile(char *FileName, int Options, USHORT *pusArray, int Length);
It is quite possible it does exist, or if not, someone could make
it for you.
Dave
Quote:
Originally posted by BigDaz
if i have an array such as:
unsigned short m_usArray[1000];
and i fill it up with unsigned shorts, is there away i can write the entire array to a file with just one command instead of doing something like:
ofstream ("file.txt");
for( int i = 0; i < 1000; i++ )
{
fout << m_usArray[i];
}
fout.close();
?
cheers, bigdaz