dev-cpp-users Mailing List for Dev-C++ (Page 80)
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: Lord S. <lor...@gm...> - 2006-06-09 03:15:35
|
No nuggets of knowledge? I'm sure there's something more on the subject. I don't know, though I can't imagine it being that simple. |
|
From: Per W. <pw...@ia...> - 2006-06-08 21:32:35
|
Of course there are more things that can be said about the subject.
There are several things to think about, but the things that comes to
mind is mainly:
- Numeric range for signed integers.
- Sign extension when changing between integers of different size.
- Bit-manipulation and shift operations.
One example where it is vital to keep track of signed/unsigned is when
using bit-fields.
typedef struct {
unsigned int active : 1;
unsigned int mode : 4;
unsigned int reset : 1;
unsigned int action : 2;
} bitfields_t;
In this case, several small bit-fields share the space in a larger integer
but the source code will not need to contain any bit manipulation.
However, if the bit field had been declared without the unsigned keyword,
the field 'active' would only have had room for -1 and 0. Since signed
values are stored in something called two-complement format, the negative
range will always be one step larger than the positive range.
For size:
1-bit -1 .. 0 <=3D=3D=3D seems illogical: can't even store the value 1!
2-bit -2 .. 1
8-bit -128 .. 127
16-bit -32768 .. 32767
=2E..
Lets try:
bitfields_t t;
printf("sizeof(t) =3D %u\n",sizeof(t));
t.active =3D 1;
printf("t.active =3D %d\n",t.active);
printf("t.active =3D %u\n",t.active);
For a 32-bit machine, the output will normally be:
sizeof(t) =3D 4
t.active =3D 1
t.active =3D 1
Now change the fields declarations from 'unsigned int' to just 'int'. The
output will then be:
sizeof(t) =3D 4
t.active =3D -1 <=3D=3D=3D assign of 1 resulted in -1 because of overf=
low.
t.active =3D 4294967295 <=3D=3D=3D sign extension makes large unsigned=
values
The signed value can only store the value -1 and 0, and since the sign bit
is set, t.active is -1.
When printing a signed value, t.active is automatically increased
in size from 1 bit up to the size of an int variable. When the
value is signed, there will be a sign extension when the storage
size is increased.
Sign extension means that the sign bit - the most significant bit in the
integer - will be copied into all new bits added for the larger integer
format.
This sign extension is very, very important to think about. For unsigned
numbers, going to a larger integer size just adds a lot of zero-bits to
the left of the original value, while for signed integers, it is the most
significant bit that gets duplicated.
For signed integers, there will be sign-extension:
1 decimal (0x01 hex) will become 0x0001, 0x00000001, etc when
sign-extending.
-1 decimal (0xff hex) will become 0xffff, 0xffffffff, etc when
sign-extended.
For a unsigned integer, the extra bits will just be set to zero:
255 decimal (0xff hex) will become 0x00ff, 0x000000ff, etc when extending
to a larger numeric type.
Bit rotations and shifts.
=3D=3D=3D=3D=3D
Note that shift operations do result in "strange" behaviour because of
sign extension of signed numbers.
Let's assume the 8-bit rotate-left code:
a =3D (a << 1) | ((a & 0x80? ? 1 : 0);
Let's assume the 8-bit rotate-right coe:
a =3D (a >> 1) | ((a & 1) ? 0x80 : 0);
The value is shifted left or right, and the bit that gets shifted out is
copied to the other end of the integer. The above code looks nice, but
let's try it:
signed char a;
unsigned char b;
unsigned i;
// Rotating 8-bit number left:=B7
printf("Rotating 8-bit signed and unsigned integer left\n");=B7
for (i =3D 1,a =3D 8,b =3D 8; i <=3D 8; i++) {=B7
a =3D (a << 1) | ((a & 0x80) ? 1 : 0);=B7
b =3D (b << 1) | ((b & 0x80) ? 1 : 0);=B7
printf("step %u: %10u %10d %02x "
"%10u %10d %02x\n",i,a,a,a & 0xff,b,b,b);=B7
}=B7
=B7
// Rotating 8-bit number right:=B7
printf("Rotating 8-bit signed and unsigned integer right\n");=B7
for (i =3D 1,a =3D 8,b =3D 8; i <=3D 8; i++) {=B7
a =3D (a >> 1) | ((a & 1) ? 0x80 : 0);=B7
b =3D (b >> 1) | ((b & 1) ? 0x80 : 0);=B7
printf("step %u: %10u %10d %02x "
"%10u %10d %02x\n",i,a,a,a & 0xff,b,b,b);=B7
}=B7
Will result in:
Rotating 8-bit signed and unsigned integer left
step 1: 16 16 10 16 16 10
step 2: 32 32 20 32 32 20
step 3: 64 64 40 64 64 40
step 4: 4294967168 -128 80 128 128 80
step 5: 1 1 01 1 1 01
step 6: 2 2 02 2 2 02
step 7: 4 4 04 4 4 04
step 8: 8 8 08 8 8 08
Rotating 8-bit signed and unsigned integer right
step 1: 4 4 04 4 4 04
step 2: 2 2 02 2 2 02
step 3: 1 1 01 1 1 01
step 4: 4294967168 -128 80 128 128 80
step 5: 4294967232 -64 c0 64 64 40
step 6: 4294967264 -32 e0 32 32 20
step 7: 4294967280 -16 f0 16 16 10
step 8: 4294967288 -8 f8 8 8 08
The left three colums is rotation of a signed value - printed as unsigned,
signed and hex.
The right three columns is rotation of a unsigned value - printed as
unsigned, signed and hex.
Note that left-rotation works as expected for both signed and unsigned
values. The large value for the fourth iteration is just sign-extension of
-128 up to full 32-bit size.
However, look at the right-rotation of signed values. While the original
value - and all left-rotated values - contained one single bit set, the
right-rotated signed value suddenly started to contain quite a lot of
bits.
When shifting signed or unsigned values left, the least significant bit
will always be a zero.
When shifting a unsigned value right, the most significant bit will always
be a zero.
However, when shifting a signed value right, the most significant bit will
be a copy of the previously most significant bit, i.e. the sign bit will
be duplicated.
When shifting -128 (0x80) right, the result will not be 64 (0x40), but
instead the negative sign bit will be duplicated, resulting in -64 (0xc0).
The duplication of the sign bit is required to allow a right-shift of a
negative value to correspond with a division by two, but shows why the
rotate-right code must be slightly extended to work with signed values.
To get a correct right-rotation, the duplicated sign-bit must be
eliminated:
a =3D ((a >> 1) & 0x7f) | ((a & 1) ? 0x80 : 0);=B7
which will give us the printout:
Rotating 8-bit signed and unsigned integer right
step 1: 4 4 04 4 4 04
step 2: 2 2 02 2 2 02
step 3: 1 1 01 1 1 01
step 4: 4294967168 -128 80 128 128 80
step 5: 64 64 40 64 64 40
step 6: 32 32 20 32 32 20
step 7: 16 16 10 16 16 10
step 8: 8 8 08 8 8 08
/Per W
On Thu, 8 Jun 2006, Lord Sauron wrote:
> No nuggets of knowledge? I'm sure there's something more on the
> subject. I don't know, though I can't imagine it being that simple.
>
|
|
From: Noorez K. <lor...@ho...> - 2006-06-08 01:32:43
|
You can test if the file is valid like this
=20
ifstream infile("testfile.dat");
=20
if( !infile )
{ return -1;//error
}
> To: dev...@li...> From: esc...@gm...> Date=
: Wed, 7 Jun 2006 21:14:54 -0400> Subject: [Dev-C++] fstream> > when openin=
g an ifstream, how do you tell if the file exists?> > > ___________________=
____________________________> Dev-cpp-users mailing list> Dev-cpp-users@lis=
ts.sourceforge.net> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcp=
p/ub.htm> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/=
|
|
From: Erik S. <esc...@gm...> - 2006-06-08 01:14:59
|
when opening an ifstream, how do you tell if the file exists? |
|
From: Per W. <pw...@ia...> - 2006-06-08 00:13:59
|
A signed variable can store both positive and negative values. /Per W On Tue, 6 Jun 2006, Erik Schmidt wrote: > what's the difference between a signed and unsigned variable > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Erik S. <esc...@gm...> - 2006-06-07 21:23:43
|
can someone point me to a tutorial on how to serialize data? |
|
From: Erik S. <esc...@gm...> - 2006-06-07 20:19:19
|
what's the difference between a signed and unsigned variable |
|
From: Roberto N. <rob...@ho...> - 2006-06-07 19:39:53
|
_________________________________________________________________ Inscreva-se no novo Windows Live Mail beta e seja um dos primeiros a testar as novidades-grátis. Saiba mais: http://www.ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d |
|
From: Per W. <pw...@ia...> - 2006-06-07 06:25:19
|
The 18.2Hz clock interrupt is normally not used.
First of all, it is only 18.2Hz in MS-DOS. It can be reprogrammed to
generate other frequencies too. The 18.2 Hz is an overflow of a 65536
times faster clock used to refresh the memory.
Even if using the 18.2 Hz tick for basic time counting, the "lost" 16 bits
can be read and used to compute the us part, and the internal counter
ticks at more than 1 MHz.
But note that there are more timers available in the PC hardware. It is
possible to use a spare timer to generate a faster clock - most OS uses a
tick counter faster than 18.2 Hz for task switching.
For timing, the best source of high-resolution time are the performance
counters available in Pentium-class processors. One of the performance
counters counts clock-cycles of uptime. This counter is often used to
write code profiling tools.
/Per W
On Tue, 6 Jun 2006, Roger Furer wrote:
> Sorry I whoopsed. Devide to get minutes: 4000 sec /60 = 66.667 min /60 =
> 1.111... hr. So yes multiply by 1000000 for microseconds. 4000 *
> 1000000 = 4 * 10^9 microseconds.
>
> Note that you need to be counting a 1MHz signal to get microsecond
> resolution.
>
> I don't know how much has changed, but in the days of DOS the clock
> interrupt occured at something like 18.5 milliseconds; making
> microsecond resolution so granular it wasn't even milliseconds.
> Roger
>
> Per Westermark wrote:
> > I don't know what minutes have to do with this.
> >
> > Note that the timeval struct splitted the information into two fields,
> > since a 32-bit unsigned integer can't hold more than 4000 seconds in
> > us-resolution.
> >
> > Since gettimeofday() stores very large numbers in the sec field - seconds
> > since 1970-01-01 00:00, you will get overflow if working with 32-bit
> > numbers. Either you should adjust your times based on the startup time of
> > your application, or you should perform the evaluation using a larger data
> > type. long long or __int64 should make sure that the information will fit
> > even if using a 32-bit processor.
> >
> > Note also that the granularity of the usec field will depend on used
> > hardware.
> >
> > /Per W
> >
> > On Tue, 6 Jun 2006, Roger Furer wrote:
> >
> >
> >>microseconds = seconds / 1000000
> >>I don't know if the value you are retrieving is accurate to that degree
> >>of precision, but you must devide. Remember, seconds * 60 = minutes.
> >>Aloha,
> >>Roger
> >>
> >>David Chu wrote:
> >>
> >>>Hi All,
> >>>
> >>>I've a question on how to convert struct timeval into microsecond.
> >>>
> >>>#include <sys/time.h>
> >>>struct timeval {
> >>> time_t sec;
> >>> suseconds_t usec;
> >>>};
> >>>
> >>>What I'm doing right now is the follow:
> >>>
> >>>struct timeval currentTime;
> >>>long timeInLong;
> >>>
> >>>gettimeofday(¤tTime, 0);
> >>>
> >>>// converts sec to microseconds
> >>>timeInLong = currentTime.tv_sec * 1000000;
> >>>
> >>>// Adds the microsecond together with the converted second.
> >>>timeInLong += sendTime.tv_usec;
> >>>
> >>>Does this look correct to you guys?
> >>>
> >>>Thanks,
> >>>
> >>>David
> >>>
> >>>
> >>>------------------------------------------------------------------------
> >>>
> >>>_______________________________________________
> >>>Dev-cpp-users mailing list
> >>>Dev...@li...
> >>>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> >>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >>
> >>
> >>
> >>
> >>
> >>_______________________________________________
> >>Dev-cpp-users mailing list
> >>Dev...@li...
> >>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> >>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >>
> >
> >
> >
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>
>
|
|
From: Per W. <pw...@ia...> - 2006-06-06 23:42:01
|
I don't know what minutes have to do with this.
Note that the timeval struct splitted the information into two fields,
since a 32-bit unsigned integer can't hold more than 4000 seconds in
us-resolution.
Since gettimeofday() stores very large numbers in the sec field - seconds
since 1970-01-01 00:00, you will get overflow if working with 32-bit
numbers. Either you should adjust your times based on the startup time of
your application, or you should perform the evaluation using a larger data
type. long long or __int64 should make sure that the information will fit
even if using a 32-bit processor.
Note also that the granularity of the usec field will depend on used
hardware.
/Per W
On Tue, 6 Jun 2006, Roger Furer wrote:
> microseconds = seconds / 1000000
> I don't know if the value you are retrieving is accurate to that degree
> of precision, but you must devide. Remember, seconds * 60 = minutes.
> Aloha,
> Roger
>
> David Chu wrote:
> > Hi All,
> >
> > I've a question on how to convert struct timeval into microsecond.
> >
> > #include <sys/time.h>
> > struct timeval {
> > time_t sec;
> > suseconds_t usec;
> > };
> >
> > What I'm doing right now is the follow:
> >
> > struct timeval currentTime;
> > long timeInLong;
> >
> > gettimeofday(¤tTime, 0);
> >
> > // converts sec to microseconds
> > timeInLong = currentTime.tv_sec * 1000000;
> >
> > // Adds the microsecond together with the converted second.
> > timeInLong += sendTime.tv_usec;
> >
> > Does this look correct to you guys?
> >
> > Thanks,
> >
> > David
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Roger F. <ra...@ha...> - 2006-06-06 19:47:36
|
microseconds = seconds / 1000000
I don't know if the value you are retrieving is accurate to that degree
of precision, but you must devide. Remember, seconds * 60 = minutes.
Aloha,
Roger
David Chu wrote:
> Hi All,
>
> I've a question on how to convert struct timeval into microsecond.
>
> #include <sys/time.h>
> struct timeval {
> time_t sec;
> suseconds_t usec;
> };
>
> What I'm doing right now is the follow:
>
> struct timeval currentTime;
> long timeInLong;
>
> gettimeofday(¤tTime, 0);
>
> // converts sec to microseconds
> timeInLong = currentTime.tv_sec * 1000000;
>
> // Adds the microsecond together with the converted second.
> timeInLong += sendTime.tv_usec;
>
> Does this look correct to you guys?
>
> Thanks,
>
> David
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: David C. <bey...@gm...> - 2006-06-06 01:37:42
|
Hi All,
I've a question on how to convert struct timeval into microsecond.
#include <sys/time.h>
struct timeval {
time_t sec;
suseconds_t usec;
};
What I'm doing right now is the follow:
struct timeval currentTime;
long timeInLong;
gettimeofday(¤tTime, 0);
// converts sec to microseconds
timeInLong = currentTime.tv_sec * 1000000;
// Adds the microsecond together with the converted second.
timeInLong += sendTime.tv_usec;
Does this look correct to you guys?
Thanks,
David
|
|
From: Bernd P. <be...@pr...> - 2006-06-06 01:24:45
|
Can anybody tell me how to include a .yy file in a project and make it a bison source file. I tried it with file properties but couldn't figure out the proper syntax. Thanks, -- Bernd |
|
From: Per W. <pw...@ia...> - 2006-06-01 23:28:00
|
But do remember a semicolon after the return ;)
/Per W
On Thu, 1 Jun 2006, David Chu wrote:
> umm...
>
> Just put return into your code, and it'll work.
>
> ex.
>
> void doSomething()
> {
> if (logicNotMet)
> return
>
> else
> // do something;
> }
>
> On 6/1/06, Erik Schmidt <esc...@gm...> wrote:
> >
> > is there a way to return or break a method of type void without
> > throwing an exception?
|
|
From: David C. <bey...@gm...> - 2006-06-01 21:43:08
|
umm...
Just put return into your code, and it'll work.
ex.
void doSomething()
{
if (logicNotMet)
return
else
// do something;
}
On 6/1/06, Erik Schmidt <esc...@gm...> wrote:
>
> is there a way to return or break a method of type void without
> throwing an exception?
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Erik S. <esc...@gm...> - 2006-06-01 21:10:45
|
is there a way to return or break a method of type void without throwing an exception? |
|
From: - E. - <eli...@gm...> - 2006-06-01 03:23:48
|
Hi,
When you close a brace with }, is there a setting to make the
indentation shift to the left? So if I type something like:
function()
{
>>>>>code
>>>>>}
The closing brace stays there, instead of moving all the way to the
left. I usually code this way but I wasn't able to find anything in
options, maybe I missed it or something.
Thanks,
- Eli
|
|
From: Rory W. <ror...@ea...> - 2006-05-31 14:16:31
|
When I select 'Auto open', 'First project file' it never seems to work? Is this a bug? Btw I'm using 4.9.9.2..... Rory. |
|
From: Noorez K. <lor...@ho...> - 2006-05-30 22:35:09
|
I was wondering if I could open the Date and Time Properties Dialog Box wit= h any Win32 function if, for example, a user clicked a button or something = in my program? _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/= |
|
From: Per W. <pw...@ia...> - 2006-05-29 08:48:09
|
Yes, there are a way to call a constructor late. The method is used when creating an object in an already existing memory buffer. However, note that a constructor normally affects all fields - and allocates resources - so you do not want to run the constructor multiple times. If you want to reset the object to an initial value, you should instead create a method init() - or possibly clear() - and have the constructor call this method. Once more, you do not want to call a constructor multiple times! If the constructor allocates memory, you would get memory leaks. /Per W On Sun, 28 May 2006, Erik Schmidt wrote: > is there a way to call a constructor on a class after the object has > been created? > > simply put, I wish to create an object, perform operations on it, > then modify it using it's constructor > > is this possible? > > > ------------------------------------------------------- > All the advantages of Linux Managed Hosting--Without the Cost and Risk! > Fully trained technicians. The highest number of Red Hat certifications in > the hosting industry. Fanatical Support. Click to learn more > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Erik S. <esc...@gm...> - 2006-05-28 21:20:18
|
is there a way to call a constructor on a class after the object has been created? simply put, I wish to create an object, perform operations on it, then modify it using it's constructor is this possible? |
|
From: Eric R. <eri...@cl...> - 2006-05-27 20:24:29
|
why is this always in HTML when plain text will do just as good
----- Original Message -----=20
From: Erik Schmidt=20
To: dev...@li...=20
Sent: Sunday, May 28, 2006 4:33 AM
Subject: [Dev-C++] endless loop
can someone explain to me why this loop is infinite?
for(int i=3Deq_unsplit.find("=3D");i<eq_unsplit.length();i++){
if(eq_unsplit[i]=3D=3D'x' || eq_unsplit[i]=3D=3D'y' || =
eq_unsplit[i]=3D=3D'z'){
//returns the location before i of any character that is not a number
prev=3Dprevious_non_numeric_location(eq_unsplit,i);
half[0]=3Dhalf[0]+"-"+eq_unsplit.substr(prev+1,i);
half[1]=3Deq_unsplit.substr(i,eq_unsplit.length())+"-0";
eq_unsplit=3Dhalf[0]+half[1];
}
}
prev=3Dint
eq_unsplit=3Dstring
half[0] and half[1]=3D string[2]
everything else should be self explanitory |
|
From: <ro...@rp...> - 2006-05-27 19:33:26
|
now this is not your daily 'i forgot WinMain in my windows application'
question but a more complex one.
what i have is a game engine based on heavy modularization. especially
the start-up code is outside the .exe running the engine. hence i have
the game engine in the shape of a .dll file providing entry points for
whatever system you want to run it on so that the user doesn't have to
worry. for windows systems the entry point looks like this:
>>> CODE
int WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow ){
=2E..
}
<<< CODE
in the launcher file i simply subclass an application class which keeps
a 'theOneAndOnly' type variable of the app-object. hence the launcher
simply links against my library and provides this subclasses object and
all is working. on my linux box this works like a charm. on the windows
machine with Dev-C++ compiling i reveive a linker error about WinMain@16
missing. it is though part of the linked library and correctly exported
( shows up in the .def file ). what can be wrong? why does the linker
not eat this?
i set the project to be 'Windows Application' without compile/link
options except -ldragengine ( =3D> libdragengine.a in dev-c++/lib ) so i
don't see a problem there. if i compile the library directly as .exe
instead of .dll it does link hence the function is there and recognized.
it simply doesn't work if i link it into an external project not having
WinMain.
--=20
Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.dnsalias.net/ )
- Game Engine: Drag(en)gine (
http://epsylon.rptd.dnsalias.net/dragengine.php )
- Normal Map Generator: DENormGen (
http://epsylon.rptd.dnsalias.net/denormgen.php )
|
|
From: Erik S. <esc...@gm...> - 2006-05-27 16:33:38
|
can someone explain to me why this loop is infinite?
for(int i=eq_unsplit.find("=");i<eq_unsplit.length();i++){
if(eq_unsplit[i]=='x' || eq_unsplit[i]=='y' || eq_unsplit[i]=='z'){
//returns the location before i of any character that is not a number
prev=previous_non_numeric_location(eq_unsplit,i);
half[0]=half[0]+"-"+eq_unsplit.substr(prev+1,i);
half[1]=eq_unsplit.substr(i,eq_unsplit.length())+"-0";
eq_unsplit=half[0]+half[1];
}
}
prev=int
eq_unsplit=string
half[0] and half[1]= string[2]
everything else should be self explanitory |
|
From: <lu...@wa...> - 2006-05-26 22:20:22
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> It is not dead, lots of people are still using it all days long.<br> <br> Guillermo Gutierrez a écrit : <blockquote cite="mid...@ar..." type="cite"> <meta http-equiv="Content-Type" content="text/html; "> <meta name="Generator" content="MS Exchange Server version 6.5.7226.0"> <title>Dev-C++ IDE dead?</title> <!-- Converted from text/rtf format --> <p><font face="Lucida Console" size="2">So, I am wondering…</font> </p> <p><font face="Lucida Console" size="2">Is the Dev-C++ IDE officially discontinued, then? Sonce there haven't been any new versions in over a year.</font> </p> <p><font face="Lucida Console" size="2">Guillermo Gutierrez</font> <br> <font face="Lucida Console" size="2">Development Systems Engineer</font> <br> <font face="Lucida Console" size="2">Market Scan Information Systems, Inc</font> <br> <font face="Lucida Console" size="2">(818) 575-2000 x2427</font> <br> <u><font color="#0000ff" face="Lucida Console" size="2"><a class="moz-txt-link-abbreviated" href="mailto:ggu...@ma...">ggu...@ma...</a></font></u> </p> <br> <div><FONT="arial">---------------------------------------------------------------------------------------<br> Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail.<br> Aucun virus connu a ce jour par nos services n'a ete detecte.<br> <br> </FONT="arial"></div> <br> </blockquote> </body> </html> |