🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by Christophe MINETTI Thu, 10 Jan 2008 10:53
std::ostringstream problem
#783
Author: Christophe MINETTI
Date: Thu, 10 Jan 2008 10:53
17 lines
1361 bytes
Hi all,

I am using an external frame grabber which uses DLL and internal
structures. To access this DLL, I have to use a strcuture with a member
postr defined as std::ostringstream *postr. Before calling my function I
use this line :

MyStruct.postr = new std::ostringstream;

which returns in a NULL pointer and the functions off the DLL crashes.

Any idea why the constructor std::ostringstream returns me a NULL
pointer ?

Many thanks in advance.

Chritophe
Re: std::ostringstream problem
#784
Author: Asger Joergensen
Date: Thu, 10 Jan 2008 11:24
24 lines
1605 bytes
Hi Christophe
 
 Christophe MINETTI says:
> Hi all,
> 
> I am using an external frame grabber which uses DLL and internal
> structures. To access this DLL, I have to use a strcuture with a member
> postr defined as std::ostringstream *postr. Before calling my function I
> use this line :
> 
> MyStruct.postr = new std::ostringstream;
> 
> which returns in a NULL pointer and the functions off the DLL crashes.
> 
> Any idea why the constructor std::ostringstream returns me a NULL
> pointer ?

You will probably be better of asking this kind of 
questions in the cppbuilder.language.cpp group they know 
a lot more about STL.

Kind regards
Asger
Re: std::ostringstream problem
#785
Author: Christophe MINETTI
Date: Thu, 10 Jan 2008 13:34
30 lines
1789 bytes
Thanks for the suggestion. Sorry if this newsgroup was inappropriate for this
problem.

Christophe

Asger Joergensen wrote:

> Hi Christophe
>
>  Christophe MINETTI says:
> > Hi all,
> >
> > I am using an external frame grabber which uses DLL and internal
> > structures. To access this DLL, I have to use a strcuture with a member
> > postr defined as std::ostringstream *postr. Before calling my function I
> > use this line :
> >
> > MyStruct.postr = new std::ostringstream;
> >
> > which returns in a NULL pointer and the functions off the DLL crashes.
> >
> > Any idea why the constructor std::ostringstream returns me a NULL
> > pointer ?
>
> You will probably be better of asking this kind of
> questions in the cppbuilder.language.cpp group they know
> a lot more about STL.
>
> Kind regards
> Asger
Re: std::ostringstream problem
#788
Author: Jarek Karciarz
Date: Fri, 11 Jan 2008 07:27
31 lines
1716 bytes
have you tried
postr=new std::ostringstream();

Jarek


-- 
Pozdrawiam
Jarek Karciarz
Ositron www.ositron.pl
mail: jka@ositron.pl
Uzytkownik "Christophe MINETTI" <cminetti@ulb.ac.be> napisal w wiadomosci 
news:4785F92D.22DC6601@ulb.ac.be...
> Hi all,
>
> I am using an external frame grabber which uses DLL and internal
> structures. To access this DLL, I have to use a strcuture with a member
> postr defined as std::ostringstream *postr. Before calling my function I
> use this line :
>
> MyStruct.postr = new std::ostringstream;
>
> which returns in a NULL pointer and the functions off the DLL crashes.
>
> Any idea why the constructor std::ostringstream returns me a NULL
> pointer ?
>
> Many thanks in advance.
>
> Chritophe
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads