Feel lost with wx/dynarray.h
"'Hibou57' via wx-users" <[email protected]> Sun, 26 Jul 2026 06:11:41 -0700 (PDT)
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_113992_34646601.1785071501275 Content-Type: multipart/alternative; boundary="----=_Part_113993_203443547.1785071501275" ------=_Part_113993_203443547.1785071501275 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello out there, With my apologizes for my lack of knowledge of C++ and wxWidgets, which may= =20 be the cause. In interface/dynarray.h there is a template class wxArray<T>. As it is in= =20 the interface directory, it appears in the=20 documentation: https://docs.wxwidgets.org/3.2/classwx_array_3_01_t_01_4.htm= l In the include directory, there is a corresponding dynarray.h but it=20 contains the template=20 classes wxArray_SortFunction, wxSortedArray_SortFunction and some others,= =20 with no wxArray. I though the interface directory was to contain a strip-down version of=20 what is in include. Where am I wrong? There is something else I don=E2=80=99t understand and that was my original= worry.=20 I had a look at those include files, after I saw this in the=20 document: https://docs.wxwidgets.org/3.2/classwx_array_3_01_t_01_4.html#a7f= cfbd2fa53fe042ea385f4e254729da It says `wxArray<T>::wxSortedArray (int(*)(T first, T=20 second) compareFunction)` It was not looking like what I knew of the syntax for pointer to functions.= =20 So I checked it, and what I read=20 at https://en.cppreference.com/cpp/language/pointer#Pointers_to_functions ,= =20 confirmed the few I know about it. I still wanted to check in case it is=20 not complete, and wrote a tiny test program in C then C++ and this kind=20 syntax was rejected, it expects the name to be after the opening=20 parentheses and star, that is, something like this: =20 `wxSortedArray (int(*compareFunction)(T first, T second))` and the same=20 with C++. Will try to investigate more, but already investigated enough to feel lost. With the hope to not annoy people=E2=80=AF=E2=80=A6 --=20 Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. ---=20 You received this message because you are subscribed to the Google Groups "= wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/wx-users/f8= 4b86c6-1430-41a0-b2dd-f32ce962e5bfn%40googlegroups.com. ------=_Part_113993_203443547.1785071501275 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div>Hello out there,</div><div><br /></div><div>With my apologizes for my = lack of knowledge of C++ and wxWidgets, which may be the cause.</div><div><= br /></div><div>In interface/dynarray.h there is a template class=C2=A0wxAr= ray<T>. As it is in the interface directory, it appears in the docume= ntation:=C2=A0https://docs.wxwidgets.org/3.2/classwx_array_3_01_t_01_4.html= </div><div><br /></div><div>In the include directory, there is a correspond= ing=C2=A0dynarray.h but it contains the template classes=C2=A0wxArray_SortF= unction,=C2=A0wxSortedArray_SortFunction and some others, with no=C2=A0wxAr= ray.</div><div><br /></div><div>I though the interface directory was to con= tain a strip-down version of what is in include. Where am I wrong?</div><di= v><br /></div><div>There is something else I don=E2=80=99t understand and t= hat was my original worry. I had a look at those include files, after I saw= this in the document:=C2=A0https://docs.wxwidgets.org/3.2/classwx_array_3_= 01_t_01_4.html#a7fcfbd2fa53fe042ea385f4e254729da</div><div><br /></div><div= >It says `wxArray<T>::wxSortedArray=C2=A0(int(*)(T first, T second)= =C2=A0compareFunction)`</div><div><br /></div><div>It was not looking like = what I knew of the syntax for pointer to functions. So I checked it, and wh= at I read at=C2=A0https://en.cppreference.com/cpp/language/pointer#Pointers= _to_functions , confirmed the few I know about it. I still wanted to check = in case it is not complete, and wrote a tiny test program in C then C++ and= this kind syntax was rejected, it expects the name to be after the opening= parentheses and star, that is, something like this:=C2=A0 `wxSortedArray= =C2=A0(int(*compareFunction)(T first, T second))` and the same with C++.</d= iv><div><br /></div><div>Will try to investigate more, but already investig= ated enough to feel lost.</div><div><br /></div><div>With the hope to not a= nnoy people=E2=80=AF=E2=80=A6</div><div><br /></div> <p></p> -- <br /> Please read <a href=3D"https://www.wxwidgets.org/support/mlhowto.htm">https= ://www.wxwidgets.org/support/mlhowto.htm</a> before posting.<br /> --- <br /> You received this message because you are subscribed to the Google Groups &= quot;wx-users" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">wx-users+u= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= wx-users/f84b86c6-1430-41a0-b2dd-f32ce962e5bfn%40googlegroups.com?utm_mediu= m=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/wx-users/f= 84b86c6-1430-41a0-b2dd-f32ce962e5bfn%40googlegroups.com</a>.<br /> ------=_Part_113993_203443547.1785071501275-- ------=_Part_113992_34646601.1785071501275--