Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Problem with C language (http://www.velocityreviews.com/forums/t956485-problem-with-c-language.html)

Tom Clancy 01-13-2013 09:45 PM

Problem with C language
 
Below there is a sample script:

--------------------------------------------------


fh = fopen( "C:\\Temp\\myfile.kkk", "w");

list = CategoryGetSymbols( categoryWatchlist, 1 );

for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )

{
fputs( symbol + " ", fh );
}


fclose( fh );

------------------------------------------------------


Ok, now the result is:

all symbol of "list" variable will be put in a single file in this manner:

A B C D E F G H ....


"BUT" I want the list of symbol must be "below" other.

A
B
C
D
..
..
..
..



How I can resolve my problem?
Thanks in advance for your help.

Tom



Tom Clancy 01-13-2013 11:46 PM

Re: Problem with C language
 
> Below there is a sample script:

> --------------------------------------------------



> fh = fopen( "C:\\Temp\\myfile.kkk", "w");


> list = CategoryGetSymbols( categoryWatchlist, 1 );


> for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )


> {
> fputs( symbol + " ", fh );
> }



> fclose( fh );


> ------------------------------------------------------



> Ok, now the result is:


> all symbol of "list" variable will be put in a single file in this manner:


> A B C D E F G H ....



> "BUT" I want the list of symbol must be "below" other.


> A
> B
> C
> D
> .
> .
> .
> .




> How I can resolve my problem?
> Thanks in advance for your help.


> Tom


resolved.

I've changed comma "," with "\n"



Tom Clancy 01-14-2013 12:47 AM

Re: Problem with C language
 
>> Below there is a sample script:

>> --------------------------------------------------



>> fh = fopen( "C:\\Temp\\myfile.kkk", "w");


>> list = CategoryGetSymbols( categoryWatchlist, 1 );


>> for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )


>> {
>> fputs( symbol + " ", fh );
>> }



>> fclose( fh );


>> ------------------------------------------------------



>> Ok, now the result is:


>> all symbol of "list" variable will be put in a single file in this manner:


>> A B C D E F G H ....



>> "BUT" I want the list of symbol must be "below" other.


>> A
>> B
>> C
>> D
>> .
>> .
>> .
>> .




>> How I can resolve my problem?
>> Thanks in advance for your help.


>> Tom


> resolved.


> I've changed comma "," with "\n"


was (space) " " with "\n".

bye.



AliceInWonderland 01-14-2013 08:17 AM

Re: Problem with C language
 
Tom Clancy wrote:
[whatever he wrote, he wasn't askin his mommie, he wanted to ask alll you
gay C++ guys, not that there is anything wrong with that.]




All times are GMT. The time now is 09:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.