Bloodshed Compiler in Windows XP print problem

Discussion in 'C++' started by German English Technical, Sep 1, 2008.

  1. Hi Community,

    Would you please be so kind and tell what is wrong with this code
    snipped :

    {
    fprintf(stdprn, " 9bB 6dB
    3dB 0dB\n");
    fprintf(stdprn, " freq dB | |
    | | \n");
    }


    Your help is much appreciated and all comments are welcome.


    Kind regards

    Al:
     
    German English Technical, Sep 1, 2008
    #1
    1. Advertisements

  2. German English Technical <> writes:

    > Hi Community,
    >
    > Would you please be so kind and tell what is wrong with this code
    > snipped :
    >
    > {
    > fprintf(stdprn, " 9bB 6dB
    > 3dB 0dB\n");
    > fprintf(stdprn, " freq dB | |
    > | | \n");
    > }
    >
    >
    > Your help is much appreciated and all comments are welcome.


    It is not any valid C++.


    Perhaps you could try to add a function declaration:

    % cat ps.c++ && gcc -c -o ps.o ps.c++ ; echo status = $?

    extern "C"{
    #include <stdio.h>
    }

    void printSomething(FILE* stdprn){
    fprintf(stdprn, " 9bB 6dB 3dB 0dB\n");
    fprintf(stdprn, " freq dB | | | | \n");
    }

    status = 0



    --
    __Pascal Bourguignon__
     
    Pascal J. Bourguignon, Sep 1, 2008
    #2
    1. Advertisements

  3. On 1 Sep, 15:01, (Pascal J. Bourguignon) wrote:
    > German English Technical <> writes:
    >
    > > Hi Community,

    >
    > > Would you please be so kind and tell what is wrong with this code
    > > snipped :

    >
    > > {
    > >     fprintf(stdprn, "                  9bB     6dB
    > > 3dB                         0dB\n");
    > >     fprintf(stdprn, " freq    dB        |       |
    > > |                           | \n");
    > > }

    >
    > > Your help is much appreciated and all comments are welcome.

    >
    > It is not any valid C++.
    >
    > Perhaps you could try to add a function declaration:
    >
    > % cat ps.c++ && gcc -c -o ps.o ps.c++ ; echo status = $?
    >
    > extern "C"{
    > #include <stdio.h>
    >
    > }
    >
    > void printSomething(FILE* stdprn){
    >     fprintf(stdprn, "              9bB   6dB   3dB   0dB\n");
    >     fprintf(stdprn, " freq    dB    |     |     |     | \n");
    >
    > }
    >
    > status = 0
    >
    > --
    > __Pascal Bourguignon__


    Hi, Good morning:

    Thanks for your kind reply and suggested code sample.
    What I was trying to do was to fins a workaround without the full
    blown Windows 32 API.

    Anyhow, thanks so much.

    Kind regards

    Al:
    ---
     
    Technical Services, Sep 2, 2008
    #3
  4. On 2008-09-02 11:40, Technical Services wrote:
    > On 1 Sep, 15:01, (Pascal J. Bourguignon) wrote:
    >> German English Technical <> writes:
    >>
    >> > Hi Community,

    >>
    >> > Would you please be so kind and tell what is wrong with this code
    >> > snipped :

    >>
    >> > {
    >> > fprintf(stdprn, " 9bB 6dB
    >> > 3dB 0dB\n");
    >> > fprintf(stdprn, " freq dB | |
    >> > | | \n");
    >> > }

    >>
    >> > Your help is much appreciated and all comments are welcome.

    >>
    >> It is not any valid C++.
    >>
    >> Perhaps you could try to add a function declaration:
    >>
    >> % cat ps.c++ && gcc -c -o ps.o ps.c++ ; echo status = $?
    >>
    >> extern "C"{
    >> #include <stdio.h>
    >>
    >> }
    >>
    >> void printSomething(FILE* stdprn){
    >> fprintf(stdprn, " 9bB 6dB 3dB 0dB\n");
    >> fprintf(stdprn, " freq dB | | | | \n");
    >>
    >> }
    >>
    >> status = 0
    >>
    >> --
    >> __Pascal Bourguignon__

    >
    > Hi, Good morning:
    >
    > Thanks for your kind reply and suggested code sample.
    > What I was trying to do was to fins a workaround without the full
    > blown Windows 32 API.


    Just to be clear, the above is standard C/C++, and has nothing to do
    with the Win32 API.

    --
    Erik Wikström
     
    Erik Wikström, Sep 2, 2008
    #4
    1. Advertisements

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. Developwebsites

    Borland vs. Bloodshed

    Developwebsites, Sep 19, 2003, in forum: C++
    Replies:
    2
    Views:
    599
    White Wolf
    Sep 19, 2003
  2. Rick
    Replies:
    4
    Views:
    519
    gswork
    Jan 23, 2004
  3. MatthewMlane
    Replies:
    12
    Views:
    525
    Joona I Palaste
    Sep 7, 2004
  4. Replies:
    3
    Views:
    2,250
    Jason
    May 12, 2007
  5. classesemail

    Linker error with template using Bloodshed compiler

    classesemail, Sep 3, 2007, in forum: C Programming
    Replies:
    0
    Views:
    604
    classesemail
    Sep 3, 2007
Loading...

Share This Page