Tue Oct 20 14:06:21 2020
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2011-07-01

HANGOUT

2020-10-20 | 2020-09-20 | 2020-08-20 | 2020-07-20 | 2020-06-20 | 2020-05-20 | 2020-04-20 | 2020-03-20 | 2020-02-20 | 2020-01-20 | 2019-12-20 | 2019-11-20 | 2019-10-20 | 2019-09-20 | 2019-08-20 | 2019-07-20 | 2019-06-20 | 2019-05-20 | 2019-04-20 | 2019-03-20 | 2019-02-20 | 2019-01-20 | 2018-12-20 | 2018-11-20 | 2018-10-20 | 2018-09-20 | 2018-08-20 | 2018-07-20 | 2018-06-20 | 2018-05-20 | 2018-04-20 | 2018-03-20 | 2018-02-20 | 2018-01-20 | 2017-12-20 | 2017-11-20 | 2017-10-20 | 2017-09-20 | 2017-08-20 | 2017-07-20 | 2017-06-20 | 2017-05-20 | 2017-04-20 | 2017-03-20 | 2017-02-20 | 2017-01-20 | 2016-12-20 | 2016-11-20 | 2016-10-20 | 2016-09-20 | 2016-08-20 | 2016-07-20 | 2016-06-20 | 2016-05-20 | 2016-04-20 | 2016-03-20 | 2016-02-20 | 2016-01-20 | 2015-12-20 | 2015-11-20 | 2015-10-20 | 2015-09-20 | 2015-08-20 | 2015-07-20 | 2015-06-20 | 2015-05-20 | 2015-04-20 | 2015-03-20 | 2015-02-20 | 2015-01-20 | 2014-12-20 | 2014-11-20 | 2014-10-20 | 2014-09-20 | 2014-08-20 | 2014-07-20 | 2014-06-20 | 2014-05-20 | 2014-04-20 | 2014-03-20 | 2014-02-20 | 2014-01-20 | 2013-12-20 | 2013-11-20 | 2013-10-20 | 2013-09-20 | 2013-08-20 | 2013-07-20 | 2013-06-20 | 2013-05-20 | 2013-04-20 | 2013-03-20 | 2013-02-20 | 2013-01-20 | 2012-12-20 | 2012-11-20 | 2012-10-20 | 2012-09-20 | 2012-08-20 | 2012-07-20 | 2012-06-20 | 2012-05-20 | 2012-04-20 | 2012-03-20 | 2012-02-20 | 2012-01-20 | 2011-12-20 | 2011-11-20 | 2011-10-20 | 2011-09-20 | 2011-08-20 | 2011-07-20 | 2011-06-20 | 2011-05-20 | 2011-04-20 | 2011-03-20 | 2011-02-20 | 2011-01-20 | 2010-12-20 | 2010-11-20 | 2010-10-20 | 2010-09-20 | 2010-08-20 | 2010-07-20 | 2010-06-20 | 2010-05-20 | 2010-04-20 | 2010-03-20 | 2010-02-20 | 2010-01-20 | 2009-12-20 | 2009-11-20 | 2009-10-20 | 2009-09-20 | 2009-08-20 | 2009-07-20 | 2009-06-20 | 2009-05-20 | 2009-04-20 | 2009-03-20 | 2009-02-20 | 2009-01-20 | 2008-12-20 | 2008-11-20 | 2008-10-20 | 2008-09-20 | 2008-08-20 | 2008-07-20 | 2008-06-20 | 2008-05-20 | 2008-04-20 | 2008-03-20 | 2008-02-20 | 2008-01-20 | 2007-12-20 | 2007-11-20 | 2007-10-20 | 2007-09-20 | 2007-08-20 | 2007-07-20 | 2007-06-20 | 2007-05-20 | 2007-04-20 | 2007-03-20 | 2007-02-20 | 2007-01-20 | 2006-12-20 | 2006-11-20 | 2006-10-20 | 2006-09-20 | 2006-08-20 | 2006-07-20 | 2006-06-20 | 2006-05-20 | 2006-04-20 | 2006-03-20 | 2006-02-20 | 2006-01-20 | 2005-12-20 | 2005-11-20 | 2005-10-20 | 2005-09-20 | 2005-08-20 | 2005-07-20 | 2005-06-20 | 2005-05-20 | 2005-04-20 | 2005-03-20 | 2005-02-20 | 2005-01-20 | 2004-12-20 | 2004-11-20 | 2004-10-20 | 2004-09-20 | 2004-08-20 | 2004-07-20 | 2004-06-20 | 2004-05-20 | 2004-04-20 | 2004-03-20 | 2004-02-20 | 2004-01-20 | 2003-12-20 | 2003-11-20 | 2003-10-20 | 2003-09-20 | 2003-08-20 | 2003-07-20 | 2003-06-20 | 2003-05-20 | 2003-04-20 | 2003-03-20 | 2003-02-20 | 2003-01-20 | 2002-12-20 | 2002-11-20 | 2002-10-20 | 2002-09-20 | 2002-08-20 | 2002-07-20 | 2002-06-20 | 2002-05-20 | 2002-04-20 | 2002-03-20 | 2002-02-20 | 2002-01-20 | 2001-12-20 | 2001-11-20 | 2001-10-20 | 2001-09-20 | 2001-08-20 | 2001-07-20 | 2001-06-20 | 2001-05-20 | 2001-04-20 | 2001-03-20 | 2001-02-20 | 2001-01-20 | 2000-12-20 | 2000-11-20 | 2000-10-20 | 2000-09-20 | 2000-08-20 | 2000-07-20 | 2000-06-20 | 2000-05-20 | 2000-04-20 | 2000-03-20 | 2000-02-20 | 2000-01-20 | 1999-12-20

Key: Value:

Key: Value:

MESSAGE
DATE 2011-07-07
FROM Ruben Safir
SUBJECT Subject: [NYLXS - HANGOUT] (fwd) Re: array initiation - methodology for converting C code to C++
From owner-hangout-outgoing-at-mrbrklyn.com Thu Jul 7 02:08:50 2011
Return-Path:
X-Original-To: archive-at-mrbrklyn.com
Delivered-To: archive-at-mrbrklyn.com
Received: by www2.mrbrklyn.com (Postfix)
id 59CF8DE2D6; Thu, 7 Jul 2011 02:08:50 -0400 (EDT)
Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com
Received: by www2.mrbrklyn.com (Postfix, from userid 28)
id 18F52DF003; Thu, 7 Jul 2011 02:08:49 -0400 (EDT)
Delivered-To: hangout-at-nylxs.com
Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89])
by www2.mrbrklyn.com (Postfix) with ESMTP id D7739DE2D6
for ; Thu, 7 Jul 2011 02:08:48 -0400 (EDT)
Received: from panix2.panix.com (panix2.panix.com [166.84.1.2])
by mailbackend.panix.com (Postfix) with ESMTP id EFB8733196
for ; Thu, 7 Jul 2011 02:08:48 -0400 (EDT)
Received: by panix2.panix.com (Postfix, from userid 20529)
id C6A7933C4A; Thu, 7 Jul 2011 02:08:48 -0400 (EDT)
From: Ruben Safir
To: hangout-at-nylxs.com
Subject: [NYLXS - HANGOUT] (fwd) Re: array initiation - methodology for converting C code to C++
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (NetBSD/5.1 (i386))
Message-Id: <20110707060848.C6A7933C4A-at-panix2.panix.com>
Date: Thu, 7 Jul 2011 02:08:48 -0400 (EDT)
Sender: owner-hangout-at-mrbrklyn.com
Precedence: bulk
Reply-To: hangout-at-mrbrklyn.com

-- forwarded message --
Path: reader1.panix.com!panix!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!v10g2000yqn.googlegroups.com!not-for-mail
From: Michael DOUBEZ
Newsgroups: comp.lang.c++
Subject: Re: array initiation - methodology for converting C code to C++
Date: Wed, 6 Jul 2011 02:56:57 -0700 (PDT)
Organization: http://groups.google.com
Lines: 78
Message-ID: <453f3d6d-dd59-475f-ab2b-c91467b257f1-at-v10g2000yqn.googlegroups.com>
References:
NNTP-Posting-Host: 62.160.54.163
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1309946217 16143 127.0.0.1 (6 Jul 2011 09:56:57 GMT)
X-Complaints-To: groups-abuse-at-google.com
NNTP-Posting-Date: Wed, 6 Jul 2011 09:56:57 +0000 (UTC)
Complaints-To: groups-abuse-at-google.com
Injection-Info: v10g2000yqn.googlegroups.com; posting-host=62.160.54.163; posting-account=4_dwSAoAAAD_OEYz89wEMQOvnJlm6isC
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HUALESRCNK
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe)
Xref: panix comp.lang.c++:1087318

On Jul 6, 5:12=A0am, Ruben Safir wrote:
> I had some C style code that essentially had
>
> const char * choices[] =3D {"Choice A", "Choice B", "Choice C", "Choice D=
"};
>
> Now this is obviously a problem in a class framework as it can not be
> initialized in the class definition.

No but it can be afterward:
class menu_window
{

static char const * const choices[];
};

char const * const menu_window::choices[] =3D {"Choice A", "Choice B",
"Choice C", "Choice D"};

> So I tried some variations so I didn't have to alter the internal code
> that used the array. =A0Someone told me to make it a static array, but
> something happened which I didn't expect. =A0I tried
>
> screens.h
>
> =A0class menu_window
> =A0 {
> =A0 =A0 public:
>
> =A0 =A0 =A0 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D =A0LIFECYCLE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
> =A0 =A0 =A0 menu_window (); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 /* constructor =A0 =A0 =A0*/
> =A0 =A0 =A0 menu_window (int height, int width, int row, int col);
> =A0 =A0 =A0 menu_window ( const menu_window &other ); =A0 /* copy constru=
ctor */
> =A0 =A0 =A0 ~menu_window (); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0/* destructor =A0 =A0 =A0 */
>
> =A0 =A0 =A0 WINDOW *menu_win;
> =A0 =A0 =A0 static char const *choices[5];
> =A0 =A0 =A0 int height;
> =A0 =A0 =A0 int width;
> ....
>
> }
>
> screens.cpp
>
> Screens::menu_window::menu_window (int pheight, int pwidth, int prow, int=
pcol): height(pheight), width(pwidth), highlight(1), choice(0) , n_choices=
(sizeof(choices)/ sizeof(choices[0])) {
> =A0 =A0row_(prow);
> =A0 =A0col_(pcol);
> =A0 =A0choices[0] =3D "Add a question ";
> =A0 =A0choices[1] =3D "Start the Quiz ";
> =A0 =A0choices[2] =3D "c ";
> =A0 =A0choices[3] =3D "d ";
> =A0 =A0choices[4] =3D "Exit ";
> =A0 =A0menu_win =3D newwin(height, width, row_(), col_() );
> =A0 =A0keypad(menu_win, TRUE);
> =A0 =A0mvprintw(0,0, "Use arrow keys to go up and down, Press enter to se=
lect choice");
> =A0 =A0refresh();
> =A0 =A0print_menu(menu_win, highlight);
>
> } =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* construct=
or =A0 =A0 =A0*/
>
> and this failed as a static. =A0When I removed static, it works fine. =A0=
Why?

Did it fail at link time ? If so, it is because you have declared it
but not defined it.

--
Michael
-- end of forwarded message --

  1. 2011-07-01 Ron Guerin <ron-at-vnetworx.net> Re: [NYLXS - HANGOUT] (fwd) US-NY: Brooklyn-Sr Pipeline Corrosion
  2. 2011-07-01 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] (fwd) US-NY: Brooklyn-Sr Pipeline Corrosion
  3. 2011-07-01 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] (fwd) US-NY: Brooklyn-Sr Pipeline Corrosion
  4. 2011-07-02 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [ruben-at-mrbrklyn.com: Re: Fwd: Baruch Dayan HaEmes]
  5. 2011-07-02 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] HP Toouchpad is out
  6. 2011-07-03 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] HP Toouchpad is out
  7. 2011-07-03 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] HP Toouchpad is out
  8. 2011-07-04 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] HP Toouchpad is out
  9. 2011-07-05 swd <sderrick-at-optonline.net> Subject: [NYLXS - HANGOUT] "Cottage cheese sales plummet as Israeli consumers revolt over price"
  10. 2011-07-05 Ron Guerin <ron-at-vnetworx.net> Subject: [NYLXS - HANGOUT] NYLUG Workshop / Hacking Society (Smalltalk, C++, Python) Tuesday July 5 6:00PM-8:00PM
  11. 2011-07-05 Contrarian <adrba-at-nyct.net> Re: [NYLXS - HANGOUT] "Cottage cheese sales plummet as Israeli
  12. 2011-07-05 Elfen Magix <elfen_magix-at-yahoo.com> Subject: [NYLXS - HANGOUT] Death of Mom.
  13. 2011-07-05 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Death of Mom.
  14. 2011-07-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) iostream manipulator construction and design
  15. 2011-07-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) array initiation - methodology for converting C code to C++
  16. 2011-07-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [samantha-at-10gen.com: [New-York-C-Developers-Group] Next Meetup -
  17. 2011-07-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [samantha-at-10gen.com: [New-York-C-Developers-Group] Next Meetup -
  18. 2011-07-05 Ron Guerin <ron-at-vnetworx.net> Re: [NYLXS - HANGOUT] Death of Mom.
  19. 2011-07-05 Ron Guerin <ron-at-vnetworx.net> Re: [NYLXS - HANGOUT] "Cottage cheese sales plummet as Israeli consumers
  20. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [rick-at-linuxmafia.com: [conspire] (forw) Re:
  21. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] OpenSuse 11.4
  22. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: iostream manipulator construction and design
  23. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) iostream manipulator construction and design
  24. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: iostream manipulator construction and design
  25. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: iostream manipulator construction and design
  26. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: iostream manipulator construction and design
  27. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: iostream manipulator construction and design
  28. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: iostream manipulator construction and design
  29. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) array initiation - methodology for converting C code to C++
  30. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: array initiation - methodology for converting C code to C++
  31. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: array initiation - methodology for converting C code to C++
  32. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: array initiation - methodology for converting C code to C++
  33. 2011-07-07 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Online C++ test
  34. 2011-07-08 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Quick before shabbos - please read
  35. 2011-07-13 einker <eminker-at-gmail.com> Subject: [NYLXS - HANGOUT] Fwd: Linux Engineer needed!
  36. 2011-07-14 Ron Guerin <ron-at-vnetworx.net> Subject: [NYLXS - HANGOUT] NYLUG Presents: 7/24 -at- 12:00PM NYLUG on The NYLUG Summer Barbecue!
  37. 2011-07-17 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Death in the family
  38. 2011-07-17 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] NYC DoE
  39. 2011-07-17 Elfen Magix <elfen_magix-at-yahoo.com> Re: [NYLXS - HANGOUT] NYC DoE
  40. 2011-07-17 Elfen Magix <elfen_magix-at-yahoo.com> Re: [NYLXS - HANGOUT] Death in the family
  41. 2011-07-17 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Death in the family
  42. 2011-07-17 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] Death in the family
  43. 2011-07-17 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] Death in the family
  44. 2011-07-18 einker <eminker-at-gmail.com> Re: [NYLXS - HANGOUT] Death in the family
  45. 2011-07-18 einker <eminker-at-gmail.com> Re: [NYLXS - HANGOUT] Death in the family
  46. 2011-07-18 Robert Menes <viewtiful.icchan-at-gmail.com> Re: [NYLXS - HANGOUT] Death in the family
  47. 2011-07-18 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] Death in the family
  48. 2011-07-19 Ron Guerin <ron-at-vnetworx.net> Re: [NYLXS - HANGOUT] Death in the family
  49. 2011-07-19 Contrarian <adrba-at-nyct.net> Re: [NYLXS - HANGOUT] Death in the family
  50. 2011-07-19 Ron Guerin <ron-at-vnetworx.net> Subject: [NYLXS - HANGOUT] NYLUG Workshop / Hacking Society (Smalltalk, C++, Python) Tuesday July 19 6:00PM-8:00PM
  51. 2011-07-21 George Cluny <ceo.brooklyn-at-gmail.com> Subject: [NYLXS - HANGOUT] Join me on AIM!

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!