PLEASE OPEN YOUR EYES RE: [Dev-C++] Re: Dev-cpp-users digest, Vol 1 #1048 - 11 msgs
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Eric R. <e.r...@pa...> - 2002-10-16 18:34:17
|
THIS EMAIL CAME IN AT 28K IN FILE SIZE IN EVERY EMAIL YOU SEE THERE IS HOW TO UNSUBSCRIBE ==========================>>>>>>>>> >To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users >or, via email, send a message with subject or body 'help' to > dev...@li... <<<<<<<<<<========================= PLEASE LOOK AT EVERY POST AND YOU WILL SEE THE INFORMATION !!!!!!!!!!! I HAVE CUT OUT ALL THE HTML CODE CRAP, AND OTHER ADD ONS SO ALL CAN SEE THE SIZE REDUCTION. A 10K FILE SIZE EMAIL IS ALL YOU NEED TO MAKE A POSTING TO ANY EMAIL GROUP SORRY FOKES BUT I HAD A GUTSFUL OF WASTING MY LIFE BECAUSE OF EMAIL VIRUS AND WOULD LIKE TO KEEP MY 10K FILE LIMIT IN THE EMAIL PROGRAM PERMITLY IN PLACE WITHOUT HAVING TO DISABLE IT ALL THE TIME. From Eric ---------- Original Message ---------------------------------- From: dev...@li... Reply-To: dev...@li... Date: Wed, 16 Oct 2002 07:55:01 -0700 > > >Today's Topics: > > 1. Re: [Mingw-users] dll to def (=?iso-8859-1?Q?Jos=E9?= Fonseca) > 2. Need help with vector<...> (=?ISO-8859-1?Q?=22J=F6rgen=22?=) > 3. Re: Sample code COMMON CONTROLS: DATETIME PICKER & still > lost (Roberto Ricardi) > 4. -fvtable-thunks and CRASH! (=?iso-8859-1?Q?Daniel_=C5kerud?=) > 5. Re: static vector initialization (Daniel Glenfield) > 6. Re: static vector initialization (Per Westermark) > 7. Help on C Standard Library provided by mingw (=?iso-8859-1?q?Alain=20KOCELNIAK?=) > 8. Re: Help on C Standard Library provided by mingw (=?ISO-8859-1?Q?=22J=F6rgen=22?=) > 9. Re: Help on C Standard Library provided by mingw (Ihsan Ali Al Darhi) > 10. Re: Help on C Standard Library provided by mingw (Per Westermark) > >--__--__-- > >Message: 1 >Date: Tue, 15 Oct 2002 20:17:59 +0100 >From: =?iso-8859-1?Q?Jos=E9?= Fonseca <j_r...@ya...> >To: Carlos =?iso-8859-1?Q?Garc=EDa?= del Monte <cg...@wo...> >Cc: dev-cpp-users-list <dev...@li...>, > min...@li... >Subject: [Dev-C++] Re: [Mingw-users] dll to def > >pexports, which is included in mingw-utils >(http://sourceforge.net/project/showfiles.php?group_id=2435&release_id=1154 57), >is a more feature-rich application for the same end. > >On Tue, Oct 15, 2002 at 07:12:32PM +0200, Carlos García del Monte wrote: >>Hi: >>Someone there talked in some post about he had a dll but not the def, in >>this address http://webclub.kcom.ne.jp/ma/colinp/gcc.html I found a link >>to download a program which make a .def file from a dll. >>I don't know if it works fine or not, neither how it works, since I >>still don't know write dlls and I don't do that, but when I saw this I >>remembered there was a message about it, so I tell you. >> > >José Fonseca > > >--__--__-- > > >Hi again. > >If I place the following line in the header file "ComputerPlayer.h" as a= > private member of my class "ComputerPlayer" > >vector< pair< unsigned long long, pair< vector< pair<int, double> >,= > vector< pair<int, double> > > > > legalVect; > >the program compiles and links just fine, but it's terminated almost= > immediately when run. > >I'm going to use the vector in two different functions, thats why I need it= > as a member of the class. >For debugging purposes, I implemented it as a local member in one of the= > functions (At the moment the only one of the two implemented), see below.= > Now it works just great. Why is that? Why can't I have it in the= > headerfile? > > >//------------------------------------------------------------------------- -= >------------------------------------- >void ComputerPlayer::insertSortedLegalMoves(vector< pair<int, double> >= > sortedLegalMoves, > unsigned long long legalMoves, > bool blackToMove){ >//This is not printed when vector<...> is declared in the header > cout << "Debug... Function 'insertSortedLegalMoves(...)' entered" << endl; > > // If I uncomment the line below and comment out the one in the header the= > program runs fine. WHY???? > //vector< pair< unsigned long long, pair< vector< pair<int, double> >,= > vector< pair<int, double> > > > > legalVect; > > vector< pair< unsigned long long, pair< vector< pair<int, double> >,= > vector< pair<int, double> > > > >::iterator iter; > > for(iter =3D legalVect.begin(); iter < legalVect.end(); iter++){ > if(iter->first =3D=3D legalMoves){ > if(blackToMove){ > iter->second.first =3D sortedLegalMoves; > return; > } > iter->second.second =3D sortedLegalMoves; > return; > } > } > > // If legalMoves not found in the vector this code is executed > vector< pair<int, double> > dummyVec; > pair< vector< pair<int, double> >, vector< pair<int, double> > > tmp; > if(blackToMove) > tmp =3D pair< vector< pair<int, double> >, vector< pair<int, double> >= > >(sortedLegalMoves, dummyVec); > else > tmp =3D pair< vector< pair<int, double> >, vector< pair<int, double> >= > >(dummyVec, sortedLegalMoves); > > legalVect.push_back(pair<unsigned long long, pair< vector< pair<int,= > double> >, vector< pair<int, double> > > >(legalMoves, tmp)); >} >//------------------------------------------------------------------------- -= >------------------------------------- > > >Any help is appreciated. Thanx >/J=F6rgenk > > > > >--__--__-- > >Message: 3 >Date: Wed, 16 Oct 2002 00:19:24 -0300 >From: Roberto Ricardi <rob...@ar...> >To: 'Dev-C++ -Users-List' <dev...@li...> >Subject: Re: [Dev-C++] Sample code COMMON CONTROLS: DATETIME PICKER & still > lost > >Yap, I´ll need a lots of HOWTOs to play friendly with the powerfull GNU >world in a win32 style, cos Im not a programmer that is really funny !. > >Best regards >Roberto > >Per Westermark wrote: > >>This isn't a funny MinGW syntax. >> >>Same thing if you work on Linux or FreeBSD or a number of other OS:es. >> >>No name collisions, since the loader always - a bit simplified but... >>- adds a "lib" prefix and a ".a" suffix. If you do write -llibcomctl32.a >>the linker will look for liblibcomctl32.a.a. >> >>Because you only specify the library name - not the actual file name - the >>linker may perform a lot of nifty extras, such as handling multiple >>versions of the libraries, shared-memory libraries, etc. >> >>If you want to know how it works, read >>http://www.tldp.org/HOWTO/Program-Library-HOWTO/ >>or else just accept that the world is complicated and some things has to >>be taken at face value. >> >>/Per W >> >> >>On Mon, 14 Oct 2002, Roberto Ricardi wrote: >> >>Ok, may be rigth or not, some warning level at first time linker >> >> >>>instance, anyway. >>>But, the fact is that mean comctl32.a looks like libcomctl32.a and the >>>sintaxis must be -lNAME where NAME is comctl32 without the 'lib' header >>>or '.a' ext. ( I read about in the dev-cpp help) funny!. >>>Do you know some win32 source examples (not very complex of course) >>>across the net more than draf a button, combo or something else ?? >>> >>>Thanks Seb >>> >>>Roberto >>> >>> >>> > > > > > >--__--__-- > >Message: 4 >From: =?iso-8859-1?Q?Daniel_=C5kerud?= <zi...@ho...> >To: <dev...@li...> >Date: Wed, 16 Oct 2002 07:45:03 +0200 >Subject: [Dev-C++] -fvtable-thunks and CRASH! > >This is a multi-part message in MIME format. > >------=_NextPart_000_0013_01C274E7.F03E3030 >Content-Type: text/plain; > charset="iso-8859-1" >Content-Transfer-Encoding: quoted-printable > > >At last I found the problem! >compiling with -fvtable-thunks is causing this simple program to crash: > > >#include <iostream> >#include <sstream> > >using std::stringstream; > >int main() >{ > stringstream s; > s << endl; > > return 0; >} > > >Why? How can I solve it? >If you ask why I use -fvtable-thunks it's because I code in directX! > >thanks! > >Daniel =C5kerud > > > > >--__--__-- > >Message: 5 >From: "Daniel Glenfield" <sp...@ho...> >To: ai...@if..., dev...@li... >Subject: Re: [Dev-C++] static vector initialization >Date: Wed, 16 Oct 2002 12:06:16 +0100 > >I am sure that the only way to initialise static members si with a static >member function, but I don't know about vectors. > >Is static const int size = 10; actually allowed? > > > > > > >>From: Anderson Ilha dos Santos <ai...@if...> >>To: dev...@li... >>Subject: [Dev-C++] static vector initialization >>Date: Mon, 14 Oct 2002 18:10:36 -0200 >> >> >>Greetings, >> >>I have been working on a set of utility functions that I gruped together on >>an >>entirely static class. The >>private part of this class has a (static) STL vector container whose >>components >>I have had trouble to >>intialize. My class partial listing can be given as below, >> >>// file utility.hpp >>class Utility >>{ >> // public interface ... >> >> private: >> static const int size = 10; >> static vector<double> vec; >>} >> >>// file utility.cpp >>#include "Utility.hpp" >>const int Utility::size; >>vector<double> Utility::vec( size ); >> >>the private member 'size' can be directly initialized in the class body >>because >>it is a static >>integral value. However, I was unable to intialize the vec components >>(vec[0], >>vec[1], etc.) directly >>below the vector<double> vec declaration in the utility.cpp file, just as I >>would have for the other >>static private members of the class. The only way I have found to >>initiliaze >>the vec components was >>to use a new function, say 'void init_vec()', and then initialize the >>components inside this new function. >> >>I would like to know whether this is indeed the case or if I am missing >>something. The init_vec() >>approach seems to be something like a "makeshift" constructor, and I would >>prefer to be able to >>initialize the container components just as I would have to a usual static >>member. >> >>I will appreciate any advice you guys can give me. >> >> Regards, Anderson. >> >> >> >> >>------------------------------------------------------- > > > >--__--__-- > >Message: 6 >Date: Wed, 16 Oct 2002 13:17:46 +0200 (CEST) >From: Per Westermark <pw...@ia...> >To: Daniel Glenfield <sp...@ho...> >cc: ai...@if..., dev...@li... >Subject: Re: [Dev-C++] static vector initialization > >Depends on compiler version. If you need backwards compatibility, it >shouldn't be used. > >/Per W > > >On Wed, 16 Oct 2002, Daniel Glenfield wrote: > >> I am sure that the only way to initialise static members si with a static= >=20 >> member function, but I don't know about vectors. >>=20 >> Is static const int size =3D 10; actually allowed? >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >> >From: Anderson Ilha dos Santos <ai...@if...> >> >To: dev...@li... >> >Subject: [Dev-C++] static vector initialization >> >Date: Mon, 14 Oct 2002 18:10:36 -0200 >> > >> > >> >Greetings, >> > >> >I have been working on a set of utility functions that I gruped together= > on=20 >> >an >> >entirely static class. The >> >private part of this class has a (static) STL vector container whose=20 >> >components >> >I have had trouble to >> >intialize. My class partial listing can be given as below, >> > >> >// file utility.hpp >> >class Utility >> >{ >> > // public interface ... >> > >> > private: >> > static const int size =3D 10; >> > static vector<double> vec; >> >} >> > >> >// file utility.cpp >> >#include "Utility.hpp" >> >const int Utility::size; >> >vector<double> Utility::vec( size ); >> > >> >the private member 'size' can be directly initialized in the class body= >=20 >> >because >> >it is a static >> >integral value. However, I was unable to intialize the vec components=20 >> >(vec[0], >> >vec[1], etc.) directly >> >below the vector<double> vec declaration in the utility.cpp file, just a= >s I >> >would have for the other >> >static private members of the class. The only way I have found to=20 >> >initiliaze >> >the vec components was >> >to use a new function, say 'void init_vec()', and then initialize the >> >components inside this new function. >> > >> >I would like to know whether this is indeed the case or if I am missing >> >something. The init_vec() >> >approach seems to be something like a "makeshift" constructor, and I wou= >ld >> >prefer to be able to >> >initialize the container components just as I would have to a usual stat= >ic >> >member. >> > >> >I will appreciate any advice you guys can give me. >> > >> > Regards, Anderson. >> > >> > >> > >> > >> >------------------------------------------------------- > > > >--__--__-- > >Message: 7 >Date: Wed, 16 Oct 2002 16:04:21 +0200 (CEST) >From: =?iso-8859-1?q?Alain=20KOCELNIAK?= <ak...@ya...> >To: dev...@li... >Subject: [Dev-C++] Help on C Standard Library provided by mingw > >Where can I find documentation, help on C Standard >library ( and others libraries ) provided by devc++ >4.0.1 ( mingw gcc 2.95.2 ). > >For example if I need an 'random' function, I must for >the moment search the word 'rand' in all the header >files ( .h ) to finally find that this function >in mingw is called srand and is defined in stdlib.h. > >Is there an interactive help ( html with index, ... ) > > >Thanks for your help. > >Alain. > >___________________________________________________________ >Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! >Yahoo! Mail : http://fr.mail.yahoo.com > > >--__--__-- > >Message: 8 >Date: Wed, 16 Oct 2002 16:16:39 +0200 >From: =?ISO-8859-1?Q?=22J=F6rgen=22?= <qa...@ho...> >To: "Alain KOCELNIAK" <ak...@ya...>, dev...@li... >Subject: Re: [Dev-C++] Help on C Standard Library provided by mingw > >For information about the standard template library (STL) I recommend > >http://www.sgi.com/tech/stl/ > >and for other > >http://www.cplusplus.com/ > >where you just do a search for what your looking for > >/J > >*********** REPLY SEPARATOR *********** > >On 2002-10-16 at 16:04 Alain KOCELNIAK wrote: > >>Where can I find documentation, help on C Standard >>library ( and others libraries ) provided by devc++ >>4.0.1 ( mingw gcc 2.95.2 ). >> >>For example if I need an 'random' function, I must for >>the moment search the word 'rand' in all the header >>files ( .h ) to finally find that this function >>in mingw is called srand and is defined in stdlib.h. >> >>Is there an interactive help ( html with index, ... ) >> >> >>Thanks for your help. >> >>Alain. >> >>___________________________________________________________ > >n > > > >--__--__-- > >Message: 9 >From: Ihsan Ali Al Darhi <ia...@jo...> >To: dev...@li... >Subject: Re: [Dev-C++] Help on C Standard Library provided by mingw >Date: Sat, 12 Oct 2002 17:39:32 -0700 > >>For information about the standard template library (STL) I recommend > >He is asking about the C standard library not the STL. There are many >differences between the two. > > >Mohammed > > >--__--__-- >Or you may try >http://www.gnu.org/software/gcc/onlinedocs/ > >/Per W > > >On Wed, 16 Oct 2002, "J=F6rgen" wrote: > >> For information about the standard template library (STL) I recommend >>=20 >> http://www.sgi.com/tech/stl/ >>=20 >> and for other >>=20 >> http://www.cplusplus.com/ >>=20 >> where you just do a search for what your looking for >>=20 >> /J >>=20 >> *********** REPLY SEPARATOR *********** >>=20 >> On 2002-10-16 at 16:04 Alain KOCELNIAK wrote: >>=20 >> >Where can I find documentation, help on C Standard >> >library ( and others libraries ) provided by devc++ >> >4.0.1 ( mingw gcc 2.95.2 ). >> > >> >For example if I need an 'random' function, I must for >> >the moment search the word 'rand' in all the header >> >files ( .h ) to finally find that this function >> >in mingw is called srand and is defined in stdlib.h. >> > >> >Is there an interactive help ( html with index, ... ) >> > >> > >> >Thanks for your help. >> > >> >Alain. >> > >> >_ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.404 / Virus Database: 228 - Release Date: 10/15/02 |