stringstream and dll

Discussion in 'C++' started by blackstreetcat@hotmail.com, May 17, 2006.

  1. Guest

    I'm trying to send a stringstream to a function in a dll like so:

    in Dll:
    class A
    {int i;
    f(istream& in)
    {
    in>>i;
    }
    };


    in the exe:
    A a;
    stringstream s<<1;
    a.f(s);

    the code dosent work access violation;
    using standard std::cin works fine;

    what is the problem with sringstream and how can \i fix it?
    thanks.
    Kat.
     
    , May 17, 2006
    #1
    1. Advertising

  2. Ian Collins Guest

    wrote:
    > I'm trying to send a stringstream to a function in a dll like so:
    >

    Try asking on a windows programming group.

    --
    Ian Collins.
     
    Ian Collins, May 17, 2006
    #2
    1. Advertising

  3. Rolf Magnus Guest

    wrote:

    > I'm trying to send a stringstream to a function in a dll like so:
    >
    > in Dll:
    > class A
    > {int i;
    > f(istream& in)
    > {
    > in>>i;
    > }
    > };


    This class has only private members. It's not a very useful one.

    > in the exe:
    > A a;
    > stringstream s<<1;


    This should generate a compile error.

    > a.f(s);


    This too.

    > the code dosent work access violation;
    > using standard std::cin works fine;
    >
    > what is the problem with sringstream and how can \i fix it?


    Questions about "dll" are best asked in a Microsoft specific newsgroup. ISO
    C++, which is the topic of this newsgroup, doesn't say anything about it.
     
    Rolf Magnus, May 17, 2006
    #3
    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. Anushi
    Replies:
    5
    Views:
    8,996
  2. heiko
    Replies:
    0
    Views:
    1,063
    heiko
    Oct 1, 2005
  3. Mr Fish
    Replies:
    5
    Views:
    611
    Karl Heinz Buchegger
    Oct 21, 2005
  4. ma740988
    Replies:
    5
    Views:
    878
  5. H. Simpson
    Replies:
    4
    Views:
    342
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page