Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   stringstream and dll (http://www.velocityreviews.com/forums/t454096-stringstream-and-dll.html)

blackstreetcat@hotmail.com 05-17-2006 09:55 AM

stringstream and dll
 
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.


Ian Collins 05-17-2006 10:50 AM

Re: stringstream and dll
 
blackstreetcat@hotmail.com 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.

Rolf Magnus 05-17-2006 04:46 PM

Re: stringstream and dll
 
blackstreetcat@hotmail.com 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.



All times are GMT. The time now is 02:03 PM.

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