dev-cpp-users Mailing List for Dev-C++ (Page 359)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Bjorn T. <bjo...@ho...> - 2003-06-30 21:10:54
|
Some questions (like general question about DirectX, DLL, Windows programming and assembly programming tutorials) seem to come over and over again. It is natural since the subjects are very exciting, but perhaps it is a little inefficient for you to type basically the same answers several times. My question is: Would be possible to create some sort of mail-list FAQ with relevant links to good tutorials? When someone finds a good tutorial it could be submitted directly to the FAQ. The mail-list archive serves this purpose to some extent, but it is too difficult to find the general answers among the more specific "what's wrong with my code" etc. Best regards Björn Terelius _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus |
|
From: Edward D. <edd...@tr...> - 2003-06-30 20:30:02
|
> Message: 4 > Date: Mon, 30 Jun 2003 18:20:11 +0200 > From: =?windows-1252?Q?Carlos_Garc=EDa_del_Monte?= <sol...@ya...> > To: dev-cpp-users <dev...@li...> > Subject: Re: [Dev-C++] DevPak > > I anser only to the first part. > It happens to me the same, I use win2k, too, what you shall do is run > the package manager, which is in the folder of dev (say C:\Dev-Cpp\), > and under the tools menu. The Package Manager has no ability to add packages, only to remove them. Once again, how do I add a DevPak to dev-cpp ? Double-clicking doesn't do it so there must be a way. |
|
From: Ioannis V. <iv...@em...> - 2003-06-30 19:27:43
|
There is not any CLK_TCK as part of any C or C++ standard. You are probably refering to CLOCKS_PER_SEC. After a search on the web I came up to this: http://www.lysator.liu.se/c/c-errata.html Check your macro name there. My Greek K&R 2 has it correctly. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of David McKen > Sent: Monday, June 30, 2003 8:49 PM > To: Dev-C Mailing List > Subject: Re: [Dev-C++] Timing My Application > > > Maybe I can do a little better. > > clock in time.h returns the number of CPU clock 'ticks' > since the process started. Combine that with the macro > CLK_TCK which gives you the number of ticks per second you > can get the most accurate timer that your processor can > handle. And best of all it is ANSI compliant. > > --- Felipe Lima <li...@cp...> wrote: > > Is there any function or command or program that, under > > windows, returns me how much time of CPU processing it > > spent? Must be someting in order or ms(milisseconds) or > > less. > > > > > > Thankx. > > > > -=-=-=-=-=-=- > > Felipe Lima - Software Tester/ Developer > > CPTS - Software Test Research Center > > HP Brazil - PUCRS > > > ===== > Signed > David Mcken > > Life Sucks > Live with it > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06 1203_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Vesa-Matti <bo...@mb...> - 2003-06-30 19:23:36
|
To my previous question. There=B4s a checkbox labeled Auto Indent in the Tools>>Editor options menu, but checking it doesn=B4t seem to have any effect. Currently the = IDE only prints everything to the same column regardless of curly brackets and everything. Vesa-Matti wrote: > Can Dev-C++ automatically indent the code? > If it can, how it can be enabled/configured? > |
|
From: Ioannis V. <iv...@em...> - 2003-06-30 19:18:29
|
One thing to not be confused in my example. The unsigned keys i am storing are sequential, that is 1,2,3,... that's why the map<unsigned,double>::size_type is used from 1 to <=.size(). I could have used an unsigned counter too. I am telling this so as to avoid possible newbie confusion, there is no separate access through a size_type. size_types are unsigned integer values used to describe the size (at least for usual containers, one can always define his own size_type and size() to describe what he imagines as "size" in his own classes. :-) ). Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of David McKen > Sent: Monday, June 30, 2003 8:53 PM > To: Dev-C Mailing List > Subject: RE: [Dev-C++] Reverse Map lookup. > > > Cool. > > The only thing I was planning on using was the [] so I > could access the function pointers in the first map > easily > (will do this more often, the reverse look-up will only > be > used by admin functions setting up the connection between > command name and function pointer) > > --- Ioannis Vranos <iv...@em...> wrote: > > > -----Original Message----- > > > From: dev...@li... > > > [mailto:dev...@li...] On > > Behalf > > > Of David McKen > > > Sent: Monday, June 30, 2003 6:27 PM > > > To: Dev-C Mailing List > > > Subject: [Dev-C++] Reverse Map lookup. > > > > > > > > > Ok, here is a question for all you STL users out > > there. > > > > > > I have a map which uses a string as the key and the > > data > > > object is a function pointer (I am yet to implement > > this so > > > don't ask me how I did it). What I would need (please > > don't > > > ask me why, it is the request of another member of > >our > > > team) but I also need to do a reverse-lookup (for a > > given > > > function pointer address what strings are assigned). > > > > > > For the curious this is for a dynamic command system. > > When > > > the user enters a command we look up what function is > > > assigned to that command. For now you can assume that > > it is > > > a 1:1 relationship, no more than one command is > > mapped > > to a > > > particular function. This might change in the future > > > (should we start implementing aliases) so a solution > > that > > > would solve this as well would be quite helpful. > > > > > > multimap for more than 1:1. > > > > > > > > > So far the only solutions I see is to set up 2 maps > > (2nd > > > one for the reverse lookup would have to be a > > multimap > > if > > > more than one command can be mapped to a particular > > > function) > > > > > > Yes. There is a std::multimap. > > > > > > >. To make sure everything is kept in sync I would > > > probably have to encapsulate it and over-ride some > > > operators. > > > > > > If you are not very time concerned (I am using maps in > > this style myself and > > haven't found it to be very slow) you can use a loop to > > check each one of > > the addresses. Look what I am doing in a program of > > mine: > > > > > > > map<unsigned, double> al; > > > > > > // Ls sorted > > > vector<double>L; > > > > > > // ... > > > > > > > > > The double are floating point numbers, the same in both > > > cases. In L they are > > > sorted though: > > > > > > > > > for(vector<unsigned>::size_type i=0; i<E.size(); ++i) > > > { > > > for(vector<unsigned>::size_type j=0; j<A[i].size(); > > > ++j) > > > { > > > al[ A[i][j] ]= something; > > > > > > L.push_back(al[ A[i][j] ]); > > > } > > > } > > > > > > > > > > > > sort(L.begin(), L.end()); > > > > > > > > > system("cls"); > > > > > > > > > > > > for(map<unsigned, double>::size_type i=1; > > i<=al.size(); > > > ++i) > > > { > > > cout<<i<<": "<<al[i]<<"\t\t\t"; > > > > > > cout<<L[i-1]<<": "; > > > > > > for(map<unsigned, double>::size_type j=1; > > > j<=al.size(); ++j) > > > { > > > if(L[i-1]==al[j]) > > > { > > > cout<<j<<endl; > > > break; > > > } > > > } > > > > > > } > > > > > > > > > > > > Check the last for loop inside the same for loop. I > > > search the value L[i-1] > > > (sorted vector) inside the map and display the unsigned > > > corresponding to it. > > > It doesn't take long. > > > > > > > > > If you can't afford it, then you will have to use a > > > multimap and a map and > > > keep them synchronized. I do not see any need to > > overload > > > anything though. > > > ===== > Signed > David Mcken > > Life Sucks > Live with it > > __________________________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo > http://search.yahoo.com > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06 1203_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Tony M. <to...@ho...> - 2003-06-30 18:46:58
|
From the Jargon File: tick n. 1. A jiffy (sense 1). 2. In simulations, the discrete unit of time that passes between iterations of the simulation mechanism. In AI applications, this amount of time is often left unspecified, since the only constraint of interest is the ordering of events. This sort of AI simulation is often pejoratively referred to as `tick-tick-tick' simulation, especially when the issue of simultaneity of events with long, independent chains of causes is handwaved. 3. In the FORTH language, a single quote character. Felipe Lima wrote: > What do you mean by "tick"? I didn't get it =( > > > -=-=-=-=-=-=- > Felipe Lima - Software Tester/ Developer > CPTS - Software Test Research Center > HP Brazil - PUCRS > ----- Original Message ----- > From: "David McKen" <ci...@ya...> > To: "Felipe Lima" <li...@cp...> > Sent: Monday, June 30, 2003 2:48 PM > Subject: Re: [Dev-C++] Timing My Application > > > >>Maybe I can do a little better. >> >>clock in time.h returns the number of CPU clock 'ticks' since the process started. Combine that with the macro CLK_TCK which gives you the number of ticks per second you can get the most accurate timer that your processor can handle. And best of all it is ANSI compliant. >> >>--- Felipe Lima <li...@cp...> wrote: >> >>>Is there any function or command or program that, under windows, returns me how much time of CPU processing it spent? Must be someting in order or ms(milisseconds) or less. >>> >>>Thankx. >>> >>>-=-=-=-=-=-=- >>>Felipe Lima - Software Tester/ Developer >>>CPTS - Software Test Research Center >>>HP Brazil - PUCRS >> >> >>===== >>Signed >>David Mcken >> >>Life Sucks >>Live with it >> >>__________________________________ >>Do you Yahoo!? >>SBC Yahoo! DSL - Now only $29.95 per month! >>http://sbc.yahoo.com |
|
From: Felipe L. <li...@cp...> - 2003-06-30 18:17:47
|
What do you mean by "tick"? I didn't get it =( -=-=-=-=-=-=- Felipe Lima - Software Tester/ Developer CPTS - Software Test Research Center HP Brazil - PUCRS ----- Original Message ----- From: "David McKen" <ci...@ya...> To: "Felipe Lima" <li...@cp...> Sent: Monday, June 30, 2003 2:48 PM Subject: Re: [Dev-C++] Timing My Application > Maybe I can do a little better. > > clock in time.h returns the number of CPU clock 'ticks' > since the process started. Combine that with the macro > CLK_TCK which gives you the number of ticks per second you > can get the most accurate timer that your processor can > handle. And best of all it is ANSI compliant. > > --- Felipe Lima <li...@cp...> wrote: > > Is there any function or command or program that, under > > windows, returns me how much time of CPU processing it > > spent? Must be someting in order or ms(milisseconds) or > > less. > > > > > > Thankx. > > > > -=-=-=-=-=-=- > > Felipe Lima - Software Tester/ Developer > > CPTS - Software Test Research Center > > HP Brazil - PUCRS > > > ===== > Signed > David Mcken > > Life Sucks > Live with it > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > |
|
From: David M. <ci...@ya...> - 2003-06-30 17:52:44
|
Cool.
The only thing I was planning on using was the [] so I
could access the function pointers in the first map
easily
(will do this more often, the reverse look-up will only
be
used by admin functions setting up the connection between
command name and function pointer)
--- Ioannis Vranos <iv...@em...> wrote:
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...] On
> Behalf
> > Of David McKen
> > Sent: Monday, June 30, 2003 6:27 PM
> > To: Dev-C Mailing List
> > Subject: [Dev-C++] Reverse Map lookup.
> >
> >
> > Ok, here is a question for all you STL users out
> there.
> >
> > I have a map which uses a string as the key and the
> data
> > object is a function pointer (I am yet to implement
> this so
> > don't ask me how I did it). What I would need (please
> don't
> > ask me why, it is the request of another member of
>our
> > team) but I also need to do a reverse-lookup (for a
> given
> > function pointer address what strings are assigned).
> >
> > For the curious this is for a dynamic command system.
> When
> > the user enters a command we look up what function is
> > assigned to that command. For now you can assume that
> it is
> > a 1:1 relationship, no more than one command is
> mapped
> to a
> > particular function. This might change in the future
> > (should we start implementing aliases) so a solution
> that
> > would solve this as well would be quite helpful.
>
>
> multimap for more than 1:1.
>
>
>
> > So far the only solutions I see is to set up 2 maps
> (2nd
> > one for the reverse lookup would have to be a
> multimap
> if
> > more than one command can be mapped to a particular
> > function)
>
>
> Yes. There is a std::multimap.
>
>
> >. To make sure everything is kept in sync I would
> > probably have to encapsulate it and over-ride some
> > operators.
>
>
> If you are not very time concerned (I am using maps in
> this style myself and
> haven't found it to be very slow) you can use a loop to
> check each one of
> the addresses. Look what I am doing in a program of
> mine:
>
>
> > map<unsigned, double> al;
> >
> > // Ls sorted
> > vector<double>L;
> >
> > // ...
> >
> >
> > The double are floating point numbers, the same in both
> > cases. In L they are
> > sorted though:
> >
> >
> > for(vector<unsigned>::size_type i=0; i<E.size(); ++i)
> > {
> > for(vector<unsigned>::size_type j=0; j<A[i].size();
> > ++j)
> > {
> > al[ A[i][j] ]= something;
> >
> > L.push_back(al[ A[i][j] ]);
> > }
> > }
> >
> >
> >
> > sort(L.begin(), L.end());
> >
> >
> > system("cls");
> >
> >
> >
> > for(map<unsigned, double>::size_type i=1;
> i<=al.size();
> > ++i)
> > {
> > cout<<i<<": "<<al[i]<<"\t\t\t";
> >
> > cout<<L[i-1]<<": ";
> >
> > for(map<unsigned, double>::size_type j=1;
> > j<=al.size(); ++j)
> > {
> > if(L[i-1]==al[j])
> > {
> > cout<<j<<endl;
> > break;
> > }
> > }
> >
> > }
> >
> >
> >
> > Check the last for loop inside the same for loop. I
> > search the value L[i-1]
> > (sorted vector) inside the map and display the unsigned
> > corresponding to it.
> > It doesn't take long.
> >
> >
> > If you can't afford it, then you will have to use a
> > multimap and a map and
> > keep them synchronized. I do not see any need to
> overload
> > anything though.
=====
Signed
David Mcken
Life Sucks
Live with it
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
|
|
From: David M. <ci...@ya...> - 2003-06-30 17:48:59
|
Maybe I can do a little better. clock in time.h returns the number of CPU clock 'ticks' since the process started. Combine that with the macro CLK_TCK which gives you the number of ticks per second you can get the most accurate timer that your processor can handle. And best of all it is ANSI compliant. --- Felipe Lima <li...@cp...> wrote: > Is there any function or command or program that, under > windows, returns me how much time of CPU processing it > spent? Must be someting in order or ms(milisseconds) or > less. > > > Thankx. > > -=-=-=-=-=-=- > Felipe Lima - Software Tester/ Developer > CPTS - Software Test Research Center > HP Brazil - PUCRS ===== Signed David Mcken Life Sucks Live with it __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
|
From: Felipe L. <li...@cp...> - 2003-06-30 17:21:32
|
Is there any function or command or program that, under windows, returns = me how much time of CPU processing it spent? Must be someting in order = or ms(milisseconds) or less.=20 Thankx. -=3D-=3D-=3D-=3D-=3D-=3D- Felipe Lima - Software Tester/ Developer CPTS - Software Test Research Center HP Brazil - PUCRS |
|
From: Ioannis V. <iv...@em...> - 2003-06-30 16:55:11
|
> -----Original Message-----
> From: dev...@li...=20
> [mailto:dev...@li...] On Behalf=20
> Of David McKen
> Sent: Monday, June 30, 2003 6:27 PM
> To: Dev-C Mailing List
> Subject: [Dev-C++] Reverse Map lookup.
>=20
>=20
> Ok, here is a question for all you STL users out there.
>=20
> I have a map which uses a string as the key and the data
> object is a function pointer (I am yet to implement this so
> don't ask me how I did it). What I would need (please don't
> ask me why, it is the request of another member of our
> team) but I also need to do a reverse-lookup (for a given
> function pointer address what strings are assigned).
>=20
> For the curious this is for a dynamic command system. When
> the user enters a command we look up what function is
> assigned to that command. For now you can assume that it is
> a 1:1 relationship, no more than one command is mapped to a
> particular function. This might change in the future
> (should we start implementing aliases) so a solution that
> would solve this as well would be quite helpful.
multimap for more than 1:1.
=20
> So far the only solutions I see is to set up 2 maps (2nd
> one for the reverse lookup would have to be a multimap if
> more than one command can be mapped to a particular
> function)
Yes. There is a std::multimap.
>. To make sure everything is kept in sync I would
> probably have to encapsulate it and over-ride some
> operators.
If you are not very time concerned (I am using maps in this style myself =
and
haven't found it to be very slow) you can use a loop to check each one =
of
the addresses. Look what I am doing in a program of mine:
map<unsigned, double> al;
=20
// Ls sorted
vector<double>L;
// ...
The double are floating point numbers, the same in both cases. In L they =
are
sorted though:
for(vector<unsigned>::size_type i=3D0; i<E.size(); ++i)
{
for(vector<unsigned>::size_type j=3D0; j<A[i].size(); ++j)
{
al[ A[i][j] ]=3D something;
L.push_back(al[ A[i][j] ]);
}
}
sort(L.begin(), L.end());
system("cls");
=20
=20
for(map<unsigned, double>::size_type i=3D1; i<=3Dal.size(); ++i)
{
cout<<i<<": "<<al[i]<<"\t\t\t";
=20
cout<<L[i-1]<<": ";
=20
for(map<unsigned, double>::size_type j=3D1; j<=3Dal.size(); ++j)
{
if(L[i-1]=3D=3Dal[j])
{
cout<<j<<endl;
break;
}
}
}
Check the last for loop inside the same for loop. I search the value =
L[i-1]
(sorted vector) inside the map and display the unsigned corresponding to =
it.
It doesn't take long.
If you can't afford it, then you will have to use a multimap and a map =
and
keep them synchronized. I do not see any need to overload anything =
though.
Ioannis Vranos
=20
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
|
|
From: Vesa-Matti <bo...@mb...> - 2003-06-30 16:42:28
|
Can Dev-C++ automatically indent the code? If it can, how it can be enabled/configured? |
|
From: <sol...@ya...> - 2003-06-30 16:21:23
|
I anser only to the first part. It happens to me the same, I use win2k, too, what you shall do is run the package manager, which is in the folder of dev (say C:\Dev-Cpp\), and under the tools menu. |
|
From: David M. <ci...@ya...> - 2003-06-30 15:26:54
|
Ok, here is a question for all you STL users out there. I have a map which uses a string as the key and the data object is a function pointer (I am yet to implement this so don't ask me how I did it). What I would need (please don't ask me why, it is the request of another member of our team) but I also need to do a reverse-lookup (for a given function pointer address what strings are assigned). For the curious this is for a dynamic command system. When the user enters a command we look up what function is assigned to that command. For now you can assume that it is a 1:1 relationship, no more than one command is mapped to a particular function. This might change in the future (should we start implementing aliases) so a solution that would solve this as well would be quite helpful. So far the only solutions I see is to set up 2 maps (2nd one for the reverse lookup would have to be a multimap if more than one command can be mapped to a particular function). To make sure everything is kept in sync I would probably have to encapsulate it and over-ride some operators. Thanks in advance __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |
|
From: Edward D. <eld...@ea...> - 2003-06-30 13:48:48
|
The instructions for installing a DevPak are to double-click on the = file. When I do that win2K says that there is no program associated with = the DevPak extension. Picking DevCpp ( C and C++ IDE ) just opens the = file in the DevCpp editor. How do I install a DevPak ? Also, while I am at it, if there is an update to a DevPak which is not = in DevPak form, such as WXWindows, how do I install that update to = DevCpp ? |
|
From: Neszt T. <ne...@ss...> - 2003-06-30 06:42:00
|
Hello! It is a normal effect, that the Dev-C++ 4, complies different file size on different processor (AMD, P4), when all other settings are same? (Project options, source) Thanks Your help in advance. Neszt Tibor |
|
From: Per W. <pw...@ia...> - 2003-06-30 02:10:06
|
When a file/stream is opened in text mode, the eol sequence is always \n
and then the underlying subsystem will perform the mapping to/from the
native format.
Notethat the underlying subsystem assumes that any read files are in the
native format, and might be confused if the file isn't. Most (all?)
dos/win libraries supports reading of both unix and dos/win files, but a
number of them gets confused for Mac files.
When reading in binary mode:
DOS/Win: \r\n
Unix: \n
Mac: \r
Unicode: U+2028
/Per W
On Mon, 30 Jun 2003, Ioannis Vranos wrote:
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf
> > Of David McKen
> > Sent: Monday, June 30, 2003 2:31 AM
> > To: Dev-Cpp Mailing List
> > Subject: [Dev-C++] Portable End-of-Line
> >
> >
> > Is there a portable way of finding out the end-of line
> > sequence for the
> > current operating system? I hope to make my program
> > portable to both Win +
> > *NIX and would like something more (what word could go
> > here?) than:
> >
> > #ifdef WIN32
> > const char DIR_SEP = '\\';
> > const char eoln[] = "\n";
> > #else
> > const char DIR_SEP = '/';
> > const char eoln[] = "\n\r";
>
>
> "\n\r" also applies at least to .NET text boxes.
>
>
> In any case only '\n' is portable.
>
>
> > #endif
> >
> > Same applies to the directory separator. Is there a way I
> > can detect which
> > one is used? As I said portability is of utmost importance
> > so it must be C++
> > ANSI compliant (my program uses classes so it cant be a C
> > compliant program.
>
>
> >From my limited experience those "\n\r" etc sequences apply only to GUI
> programs.
>
> Any way, about line change since '\n' exists in all cases you can detect it
> by reading character by character. If you want to display it consider it as
> a system extension and you can handle it as all system extensions by
> encapsulating it to a small portion of your program:
>
>
> Example:
>
> // Unportable encapsulations
> namespace uenc
> {
> const string eol="\n";
>
> inline void clearscr()
> {
> system("cls");
> }
>
> // ...
> }
>
>
> So when you want to compile the program in another platform you have only to
> change those encapsulations.
>
>
> And try to forget the ancient C style stuff where C++ provides superior
> alternatives.
>
>
>
>
> Ioannis Vranos
>
> * Programming pages: http://www.noicys.freeurl.com
> * Alternative URL 1: http://run.to/noicys
> * Alternative URL 2: http://www.noicys.cjb.net
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Ioannis V. <iv...@em...> - 2003-06-30 00:12:35
|
> -----Original Message-----
> From: dev...@li...=20
> [mailto:dev...@li...] On Behalf=20
> Of David McKen
> Sent: Monday, June 30, 2003 2:31 AM
> To: Dev-Cpp Mailing List
> Subject: [Dev-C++] Portable End-of-Line
>=20
>=20
> Is there a portable way of finding out the end-of line
> sequence for the
> current operating system? I hope to make my program
> portable to both Win +
> *NIX and would like something more (what word could go
> here?) than:
>=20
> #ifdef WIN32
> const char DIR_SEP =3D '\\';
> const char eoln[] =3D "\n";
> #else
> const char DIR_SEP =3D '/';
> const char eoln[] =3D "\n\r";
"\n\r" also applies at least to .NET text boxes.
In any case only '\n' is portable.
> #endif
>=20
> Same applies to the directory separator. Is there a way I
> can detect which
> one is used? As I said portability is of utmost importance
> so it must be C++
> ANSI compliant (my program uses classes so it cant be a C
> compliant program.
From my limited experience those "\n\r" etc sequences apply only to GUI
programs.
Any way, about line change since '\n' exists in all cases you can detect =
it
by reading character by character. If you want to display it consider it =
as
a system extension and you can handle it as all system extensions by
encapsulating it to a small portion of your program:
Example:
// Unportable encapsulations
namespace uenc
{
const string eol=3D"\n";
inline void clearscr()
{
system("cls");
}
// ...
}
So when you want to compile the program in another platform you have =
only to
change those encapsulations.
And try to forget the ancient C style stuff where C++ provides superior
alternatives.
Ioannis Vranos
=20
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
|
|
From: David M. <ci...@ya...> - 2003-06-29 23:30:49
|
Is there a portable way of finding out the end-of line sequence for the current operating system? I hope to make my program portable to both Win + *NIX and would like something more (what word could go here?) than: #ifdef WIN32 const char DIR_SEP = '\\'; const char eoln[] = "\n"; #else const char DIR_SEP = '/'; const char eoln[] = "\n\r"; #endif Same applies to the directory separator. Is there a way I can detect which one is used? As I said portability is of utmost importance so it must be C++ ANSI compliant (my program uses classes so it cant be a C compliant program. Signed David Mcken __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |
|
From: Colin L. <ha...@bl...> - 2003-06-29 14:20:26
|
Hi, We are working on it, through a new site for Dev-C++. Hopefully we should finish it soon :) Greetings, Colin On Thursday 26 June 2003 00:12, you wrote: > Hi all, > > Is there a DevPak repository where we can post (get..:o) DevPak's? > > Best Regards > Staale > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Ioannis V. <iv...@em...> - 2003-06-29 02:29:27
|
Well since everyone is sleeping, here is a classic one for C programmers: http://home.datacomm.ch/t_wolf/tw/c/ten_commandments.html Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |
|
From: andreithomaz <and...@bo...> - 2003-06-29 02:18:49
|
hello list, with to the help of some members of this list, and of some friends of mine, I got to finish the screensaver that generates and solves a maze. But now there is another problem: it works fine in fullscreen but, when a fraction of it is shown in the "Control Panel->Video" (my Windows is in Portuguese, so maybe it is "Control Pane->Screen", I don't know), it crashes if it starts three times. Has anybody had this problem in the past? I tried some changes in the way that memory allocation is done, but nothing worked... the code, and the screensaver, is in http://www.civitas.lelic.ufrgs.br/andrei/dedalo_ariadne1.zip thank you, andrei -- Andrei R. Thomaz and...@bo... fone: 92067436 |
|
From: Abhijit S. <mu...@gm...> - 2003-06-28 17:55:14
|
> Does anybody know why this piece of code does not work? It gives > me an "invalid pointer operation". Have you actually #include'd main.h from resource.h? If not, try including it. If it gives errors, move all the resource-related defines into a separate file (usually with an extention .rh) and included it in both the main header and resource file. It would be a good idea to make the rh file re-entrant using this technique: -- start file `foo.rh' -- #ifndef _FOO_RH #define _FOO_RH #define IDC_NUMBER 610 #endif // _FOO_RH -- stop file `foo.h' -- If you understand how a pre-processor works, this should make sense. The _FOO_RH is only convention (generated from the filename). You can name it anyway you like, as long as it doesn't conflict with any other macros. HTH. -- Abhijit Shylanath Homepage: http://mudeth.tripod.com/ |
|
From: Abhijit S. <mu...@gm...> - 2003-06-28 17:54:58
|
Hello, Carlson. > // I am posting this on the internet for new people so they won't have to > // try and figure this all out from scratch. It took me a long time > and > // in general I know how to program but the std::library stuff is > taking > // me longer than I thought to learn. Why not start an open-source project, create a website for it, and announce it on Freshmeat? Please don't post complete source-code for the program, as you update it, here. It can eat up a lot of bandwidth over time. Besides, this mailing-list is not intended for that. At the very least, upload it to a site and post the URL, along with a text of changes, here. Also, posting it to a site will give it greater exposure to web-search engines, so more people can benefit from your code, rather than only the handful of C++ programmers who are subscribed to this list. -- Abhijit Shylanath Homepage: http://mudeth.tripod.com/ |
|
From: <ni...@ko...> - 2003-06-28 07:09:26
|