Problem with C language

Discussion in 'C++' started by Tom Clancy, Jan 13, 2013.

  1. Tom Clancy

    Tom Clancy Guest

    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, Jan 13, 2013
    #1
    1. Advertising

  2. Tom Clancy

    Tom Clancy Guest

    > 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, Jan 13, 2013
    #2
    1. Advertising

  3. Tom Clancy

    Tom Clancy Guest

    >> 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.
    Tom Clancy, Jan 14, 2013
    #3
  4. 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.]
    AliceInWonderland, Jan 14, 2013
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed
    Replies:
    24
    Views:
    996
    Dimitri Maziuk
    Mar 27, 2006
  2. DaveInSidney
    Replies:
    0
    Views:
    414
    DaveInSidney
    May 9, 2005
  3. pabbu
    Replies:
    8
    Views:
    720
    Marc Boyer
    Nov 7, 2005
  4. Shravani
    Replies:
    8
    Views:
    797
    Bartc
    Mar 16, 2008
  5. Replies:
    28
    Views:
    1,167
Loading...

Share This Page