|
From: Daniel G. <sp...@ho...> - 2003-07-03 12:33:08
|
I don't know much about sprintf, but maybe it it trying to write the value
of n into your 3d% bit ?
Try putting the \n command in another printf statement - this should give
the same effect.
Daniel
>From: "Jorge Abramian" <jab...@ma...>
>Reply-To: <jab...@ma...>
>To: <dev...@li...>
>Subject: [Dev-C++] (no subject)
>Date: Thu, 3 Jul 2003 07:02:26 -0400
>
>Hi,
>
>I wrote this piece of code willing that the numbers be written in different
>lines. However, the linefeed does not work. Any hint?
>
>///
>...
>#define <stdio.h>
>...
> hFile = CreateFile(szFileName, GENERIC_WRITE, 0, 0,
> CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
>
> for (loop=0;loop<Number_of_Points;loop++)
> {
> DWORD dWritten;
> sprintf (temp,"%3d\n\r",ran1[loop]);
> WriteFile(hFile, temp, sizeof(temp),&dWritten, NULL);
> }
>
>/////
>Thanks a lot
>
>JEA
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Free pre-built ASP.NET sites including
>Data Reports, E-commerce, Portals, and Forums are available now.
>Download today and enter to win an XBOX or Visual Studio .NET.
>http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger
|