Saturday, July 18, 2015

Digest for comp.lang.c++@googlegroups.com - 2 updates in 2 topics

Paul N <gw7rib@aol.com>: Jul 18 09:44AM -0700

On Friday, 17 July 2015 16:30:24 UTC+1, fl wrote:
> }
 
> Could you explain it to me?
> '*&' looks weird I feel.
 
Here's a simpler example. Suppose we have a function that returns a value. But it might also go wrong. We start off with a pointer to char (a C-style string) and if the function works this is left as NULL and the returned value can be used. If it is not NULL, the returned value should not be used, and the pointer can be used, say in an error message.
 
int func(char *& err, ...other stuff...) {
if (problem) { err = "First problem"; return 0; }
stuff here
if (other problem) { err = "Second problem"; return 0; }
return value; } // zero might be a valid value here
 
int caller(stuff) {
char *err = NULL;
val = func(err, whatever);
if (err) { moan about error }
else { use val } }
"Öö Tiib" <ootiib@hot.ee>: Jul 18 04:23AM -0700

On Friday, 17 July 2015 22:39:00 UTC+3, Doug Mika wrote:
 
> > Thanks
> > Doug
 
> You mean, when installing mingw-w64 there is an option during installation to select pthread, which allows threads to work?
 
Yes. If you do not want to choose, download and unpack the 7-zip file
for configuration you want from sourceforge yourself then there is
an installer.
Mingw-w64 installer asks immediately for settings (to choose
configuration). I trust posix thread are there as default selection.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: