dev-cpp-users Mailing List for Dev-C++ (Page 6)
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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(1) |
2
|
|
3
(1) |
4
(6) |
5
(6) |
6
|
7
(9) |
8
(5) |
9
(2) |
|
10
|
11
(3) |
12
(8) |
13
(20) |
14
(4) |
15
(8) |
16
(7) |
|
17
(7) |
18
|
19
|
20
(3) |
21
(14) |
22
(2) |
23
(5) |
|
24
(2) |
25
(11) |
26
(14) |
27
(3) |
28
(1) |
29
(1) |
30
(4) |
|
From: Reid T. <Rei...@at...> - 2005-04-07 12:21:06
|
also take a look through /usr/include/time.h -- then google on some of
the functions that are declared in it.
=20
=20
reid=20
-----Original Message-----
From: Alfred P. Reaud [mailto:al...@ya...]=20
Sent: Thursday, April 07, 2005 12:23 AM
To: Dev-Cpp UserList
Subject: Re: [Dev-C++] To get the current time and date.....
Dear Letchu,
=20
Look in time.h in the include folder or refer to:
"The C Library Reference Guide"=20
{ <http://www.acm.uiuc.edu/webmonkeys/book/c_guide/>
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/ } section 2.15 at
bottom of page, or=20
"C/C++ Reference" { <http://www.cppreference.com/>
http://www.cppreference.com/ }.
LETCHUMANAN SAMINADAN <arl...@ya...> wrote:
Dear Sir,
=20
Currently I'm working on a programme 'data entry'. I need to enter the
current time and date into my programme. Is there any c source code for
that.
=20
I try to find out from the website, most of the source code are on c++.
But I'm doing my programme based on c source code. Is there any other
where for me to get c source code for the current time and date.
=20
Thank you,
Letchu...
<http://sg.yimg.com/i/sg/icons/16/sms2.gif> Yahoo! Mobile
<http://sg.rd.yahoo.com/mail/tagline/?http://sg.mobile.yahoo.com/>=20
- Download the latest ringtones, games, and more!
Alfred P. Reaud <mailto:al...@ya...>=20
<http://www.geocities.com/alreaud/> =20
|
|
From: Josh M. <mrl...@gm...> - 2005-04-07 11:10:22
|
You're having the if statements run if there's a problem opening
either file, which is your problem. You should be checking if fopen()
returns non-NULL.
Josh
On Apr 7, 2005 7:16 PM, Ecpin <ec...@ne...> wrote:
> Hi,
>
> After many years I returned to C and used Bloodshed Dev-C++ IDE v4 to
> code a simple routine (as MS-DOS/console application) that should print
> a text file.
>
> But, even though the code looks correct and compiles succesfully, when I
> run the program, windows displays the following error msg and the
> program terminates.
>
> **- error msg:
>
> PrintMe.exe - Application Error
>
> The instruction at "0x78024222" referenced memory at "0x0000000c".
> The memory could not be "read".
>
> Click on OK to terminate the program
> Click on CANCEL to debug the program
>
> <OK BUTTON> <CANCEL BUTTON>
>
> **- end of error msg
>
> The code I wrote is reproduced below:-
>
> **- code begins:
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char *argv[])
> {
> char str[80];
> FILE *fp, *stdprn;
>
> if ((fp = fopen(argv[1], "r")) == NULL)
> {
> if ((stdprn = fopen("PRN", "w")) == NULL)
> while(!feof(fp)) { // error occurs here,
> fgets(str, 79, fp); // or here
> fprintf(stdprn, "%s", &str);
> }
> }
> fclose(fp);
> fclose(stdprn);
> return 0;
> }
>
> **- code ends
>
> Pls advice what could be wrong
>
> Rgds
> R3
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> 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: Carlo <car...@li...> - 2005-04-07 10:02:03
|
Ecpin ha scritto lo scorso 07/04/2005 11:16:
> Hi,
[...]
> The code I wrote is reproduced below:-
>
> **- code begins:
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char *argv[])
> {
> char str[80];
> FILE *fp, *stdprn;
>
+ if (argc > 1)
+ {
- if ((fp = fopen(argv[1], "r")) == NULL)
+ fp = fopen(argv[1], "r");
+ if (fp != NULL)
> {
- if ((stdprn = fopen("PRN", "w")) == NULL)
+ stdprn = fopen("PRN", "w");
+ if (stdprn != NULL)
+ {
> while(!feof(fp)) { // error occurs here,
> fgets(str, 79, fp); // or here
- fprintf(stdprn, "%s", &str);
+ fprintf(stdprn, "%s", str);
> }
+ fclose(stdprn);
+ }
+ fclose(fp);
> }
- fclose(fp);
- fclose(stdprn);
> return 0;
> }
Not sure that diff-like notation is clear (- means remove this line, +
means insert this), but this should work.
|
|
From: Ecpin <ec...@ne...> - 2005-04-07 09:13:47
|
Hi,
After many years I returned to C and used Bloodshed Dev-C++ IDE v4 to
code a simple routine (as MS-DOS/console application) that should print
a text file.
But, even though the code looks correct and compiles succesfully, when I
run the program, windows displays the following error msg and the
program terminates.
**- error msg:
PrintMe.exe - Application Error
The instruction at "0x78024222" referenced memory at "0x0000000c".
The memory could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program
<OK BUTTON> <CANCEL BUTTON>
**- end of error msg
The code I wrote is reproduced below:-
**- code begins:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
char str[80];
FILE *fp, *stdprn;
if ((fp = fopen(argv[1], "r")) == NULL)
{
if ((stdprn = fopen("PRN", "w")) == NULL)
while(!feof(fp)) { // error occurs here,
fgets(str, 79, fp); // or here
fprintf(stdprn, "%s", &str);
}
}
fclose(fp);
fclose(stdprn);
return 0;
}
**- code ends
Pls advice what could be wrong
Rgds
R3
|
|
From: Alfred P. R. <al...@ya...> - 2005-04-07 04:23:34
|
Dear Letchu,
Look in time.h in the include folder or refer to:
"The C Library Reference Guide"
{ http://www.acm.uiuc.edu/webmonkeys/book/c_guide/ } section 2.15 at bottom of page, or
"C/C++ Reference" { http://www.cppreference.com/ }.
LETCHUMANAN SAMINADAN <arl...@ya...> wrote:
Dear Sir,
Currently I'm working on a programme 'data entry'. I need to enter the current time and date into my programme. Is there any c source code for that.
I try to find out from the website, most of the source code are on c++. But I'm doing my programme based on c source code. Is there any other where for me to get c source code for the current time and date.
Thank you,
Letchu...
Yahoo! Mobile
- Download the latest ringtones, games, and more!
Alfred P. Reaud
|
|
From: LETCHUMANAN S. <arl...@ya...> - 2005-04-07 02:07:53
|
Dear Sir, Currently I'm working on a programme 'data entry'. I need to enter the current time and date into my programme. Is there any c source code for that. I try to find out from the website, most of the source code are on c++. But I'm doing my programme based on c source code. Is there any other where for me to get c source code for the current time and date. Thank you, Letchu... Yahoo! Mobile - Download the latest ringtones, games, and more! |
|
From: Cary H. <xen...@gm...> - 2005-04-05 16:44:07
|
This is the whole point of F/OSS software, There is no *commerical* or *full* version.. what you download is the complete IDE.. That being said, there are an enormous amount of add-ins, plugins, etc, that you can install which extend / implement new functionality.. Even better, if you want, you can add your own feature, and release it so that everyone else can benefit from it. On Apr 5, 2005 10:21 AM, Verne H. Bohlender <ve...@sy...> wrote: > > You already have the full version and you got it the way all get it by your > downloading of it from gnu. It's a terrific little program and still being > developed and to myself it lets me do a lot of experimenting with programs > that isn't possible to do with others that I have and still end up with a > working program to be used on Windows XP. I'm a rank amateur to boot. > Verne > > > > To whom it may concern, > > I've downloaded Dev-Cpp Free Software from the net. I try to run my visual > 'c' source code, I manage to run it. If I want to get a full version of DC++ > with license, from where I can get it and how much is the price for this > software. > > Would you be able to forward it to me as soon as possible... > > Thanks, > > From, > Letchu... > > Yahoo! Mobile > - Download the latest ringtones, games, and more! |
|
From: Verne H. B. <ve...@sy...> - 2005-04-05 14:21:30
|
You already have the full version and you got it the way all get it by = your downloading of it from gnu. It's a terrific little program and = still being developed and to myself it lets me do a lot of experimenting = with programs that isn't possible to do with others that I have and = still end up with a working program to be used on Windows XP. I'm a = rank amateur to boot. Verne To whom it may concern, I've downloaded Dev-Cpp Free Software from the net. I try to run my = visual 'c' source code, I manage to run it. If I want to get a full = version of DC++ with license, from where I can get it and how much is = the price for this software. Would you be able to forward it to me as soon as possible... Thanks, From, Letchu... Yahoo! Mobile - Download the latest ringtones, games, and more! |
|
From: Martin D. <nex...@qu...> - 2005-04-05 14:07:22
|
LETCHUMANAN SAMINADAN wrote: > To whom it may concern, > > I've downloaded Dev-Cpp Free Software from the net. I try to run my > visual 'c' source code, I manage to run it. If I want to get a full > version of Dev-C++ with license, from where I can get it and how much > is the price for this software. > > Would you be able to forward it to me as soon as possible... > > Thanks, > > From, > Letchu... > > * Yahoo! Mobile > <http://sg.rd.yahoo.com/mail/tagline/?http://sg.mobile.yahoo.com/>* > - Download the latest ringtones, games, and more! > Dev-C++ is released under GNU GPL copyleft licence (you can view it from Help/About in Dev-C++). It is completely free of charges so what you have downloaded IS the full version. You can make a donation to the developer team using Paypal.com services (see section "Donations" at http://bloodshed.net/dev/devcpp.html). |
|
From: LETCHUMANAN S. <arl...@ya...> - 2005-04-05 02:44:53
|
To whom it may concern, I've downloaded Dev-Cpp Free Software from the net. I try to run my visual 'c' source code, I manage to run it. If I want to get a full version of Dev-C++ with license, from where I can get it and how much is the price for this software. Would you be able to forward it to me as soon as possible... Thanks, From, Letchu... Yahoo! Mobile - Download the latest ringtones, games, and more! |
|
From: LETCHUMANAN S. <arl...@ya...> - 2005-04-05 02:39:50
|
LETCHUMANAN SAMINADAN <arl...@ya...> wrote:To whom it may concern, I've downloaded Dev-Cpp Free Software from the net. I try to run my visual 'c' source code, I manage to run it. If I want to get a full version of Dev-C++ with license, from where I can get it and how much is the price for this software. Would you be able to forward it to me as soon as possible... Thanks, From, Letchu... Yahoo! Mobile - Download the latest ringtones, games, and more! Yahoo! Mobile - Download the latest ringtones, games, and more! |
|
From: LETCHUMANAN S. <arl...@ya...> - 2005-04-05 02:33:50
|
To whom it may concern, I've downloaded Dev-Cpp Free Software from the net. I try to run my visual 'c' source code, I manage to run it. If I want to get a full version of DC++ with license, from where I can get it and how much is the price for this software. Would you be able to forward it to me as soon as possible... Thanks, From, Letchu... Yahoo! Mobile - Download the latest ringtones, games, and more! |
|
From: Per W. <pw...@ia...> - 2005-04-04 22:07:44
|
Aha. Then I understand. It can sometimes be a bit funny with automatically added disclaimers :) /Per W On Mon, 4 Apr 2005 Mat...@Ve... wrote: > $LIST_MEMBERS: > Sorry for spamming you with the disclaimer. > > Per: > I have absolutely no choice in the matter. The disclaimer has no legal > effect. It is put there mandatorily by my employer's SMTP gateway. I cannot > remove it or change it at all. > > -----Original Message----- > From: Per Westermark [mailto:pw...@ia...] > Sent: Monday, April 04, 2005 1:51 PM > To: Mat...@Ve... > Cc: A_B...@gm...; dev...@li... > Subject: RE: [Dev-C++] flexibla array > > See missing line below. > > By the way, I don't very much like variable names 'tmp' and 'tmp2'. > > How about calling them 'current' and 'previous' or something similar, > since they represent the order of the entries when iterating through the > list. > > And by the way - this is a normal dual-linked (forward+backward) list, not > a flexible (?) array. > > One more thing - why post a mail to a mailing list, claiming that the > contents of the mail is or may be proprietary? The only legalese that > might be suitable for mailing lists is that expressed oppinions are your > personal ones, and not necessarily the official ones of a > company/organisation/... > > /Per W |
|
From: <Mat...@Ve...> - 2005-04-04 21:13:23
|
$LIST_MEMBERS: Sorry for spamming you with the disclaimer. Per: I have absolutely no choice in the matter. The disclaimer has no legal effect. It is put there mandatorily by my employer's SMTP gateway. I cannot remove it or change it at all. -----Original Message----- From: Per Westermark [mailto:pw...@ia...] Sent: Monday, April 04, 2005 1:51 PM To: Mat...@Ve... Cc: A_B...@gm...; dev...@li... Subject: RE: [Dev-C++] flexibla array See missing line below. By the way, I don't very much like variable names 'tmp' and 'tmp2'. How about calling them 'current' and 'previous' or something similar, since they represent the order of the entries when iterating through the list. And by the way - this is a normal dual-linked (forward+backward) list, not a flexible (?) array. One more thing - why post a mail to a mailing list, claiming that the contents of the mail is or may be proprietary? The only legalese that might be suitable for mailing lists is that expressed oppinions are your personal ones, and not necessarily the official ones of a company/organisation/... /Per W ___________________________________________________________________ The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you. |
|
From: Per W. <pw...@ia...> - 2005-04-04 20:51:11
|
See missing line below.
By the way, I don't very much like variable names 'tmp' and 'tmp2'.
How about calling them 'current' and 'previous' or something similar,
since they represent the order of the entries when iterating through the
list.
And by the way - this is a normal dual-linked (forward+backward) list, not
a flexible (?) array.
One more thing - why post a mail to a mailing list, claiming that the
contents of the mail is or may be proprietary? The only legalese that
might be suitable for mailing lists is that expressed oppinions are your
personal ones, and not necessarily the official ones of a
company/organisation/...
/Per W
On Mon, 4 Apr 2005 Mat...@Ve... wrote:
> <?xml version=3D"1.0" ?>
> This code is too complicated.
> Use an STL structure like vector, list, slist, map, or hashmap.
>
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...]On Behalf Of
> A_B...@gm...
> Sent: Monday, April 04, 2005 1:16 PM
> To: dev...@li...
> Subject: [Dev-C++] flexibla array
>
>
> Hi,
> I'm trying to create an flexible array.
> I have a structure named roomDat.
> At the 1st und 2nd call of addRoom() every thing seems to be OK, but the
> second time the will no memory be reserved, because the ID is always 2 af=
ter
> the 1st call...
>
> [CODE]
> extern roomDat* Raum;
> int cSpiel::addRoom(){
> /* TODO (AB#1#): neuen Raum erstellen, ID zur=FCckgeben */
> int ID =3D 0;
> if(!Raum){
> Raum =3D (roomDat*)malloc(sizeof(roomDat));
> Raum->Prev =3D NULL;
> Raum->Next =3D NULL;
> Raum->ID =3D ++ID;
> sprintf(Raum->Name, lang[7], ID);
> Raum->Mesh =3D NULL;
> Raum->Node =3D NULL;
> wnd_Anfang.addRoom(Raum->Name, Raum->ID);
> }else{
> roomDat* tmp =3D Raum;
> roomDat* tmp2 =3D NULL;
> while(tmp){
> if(tmp->ID > ID) ID =3D tmp->ID;
> tmp2 =3D tmp;
> tmp =3D tmp->Next;
> }
> tmp =3D (roomDat*)malloc(sizeof(roomDat));
you are missing a
tmp2->Next =3D tmp;
to let the previous tail point to the new entry
> tmp->Prev =3D tmp2;
> tmp->Next =3D NULL;
> tmp->ID =3D ++ID;
> sprintf(tmp->Name, lang[7], ID);
> tmp->Mesh =3D NULL;
> tmp->Node =3D NULL;
> wnd_Anfang.addRoom(tmp->Name, tmp->ID);
> }
> return ID;
> }
> [/CODE]
>
> What's wrong ???
>
> ___________________________________________________________________
> The information contained in this message and any attachment may be
> proprietary, confidential, and privileged or subject to the work
> product doctrine and thus protected from disclosure. If the reader
> of this message is not the intended recipient, or an employee or
> agent responsible for delivering this message to the intended
> recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited.
> If you have received this communication in error, please notify me
> immediately by replying to this message and deleting it and all
> copies and backups thereof. Thank you.
>
>
|
|
From: <Mat...@Ve...> - 2005-04-04 20:21:22
|
<?xml version=3D"1.0" ?>
This code is too complicated.
Use an STL structure like vector, list, slist, map, or hashmap.
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of
A_B...@gm...
Sent: Monday, April 04, 2005 1:16 PM
To: dev...@li...
Subject: [Dev-C++] flexibla array
Hi,
I'm trying to create an flexible array.
I have a structure named roomDat.
At the 1st und 2nd call of addRoom() every thing seems to be OK, but the
second time the will no memory be reserved, because the ID is always 2 after
the 1st call...
[CODE]
extern roomDat* Raum;
int cSpiel::addRoom(){
/* TODO (AB#1#): neuen Raum erstellen, ID zur=FCckgeben */
int ID =3D 0;
if(!Raum){
Raum =3D (roomDat*)malloc(sizeof(roomDat));=20
Raum->Prev =3D NULL;
Raum->Next =3D NULL;
Raum->ID =3D ++ID;
sprintf(Raum->Name, lang[7], ID);
Raum->Mesh =3D NULL;
Raum->Node =3D NULL; =20
wnd_Anfang.addRoom(Raum->Name, Raum->ID);
}else{
roomDat* tmp =3D Raum;
roomDat* tmp2 =3D NULL;
while(tmp){
if(tmp->ID > ID) ID =3D tmp->ID;
tmp2 =3D tmp;
tmp =3D tmp->Next;
}
tmp =3D (roomDat*)malloc(sizeof(roomDat));=20
tmp->Prev =3D tmp2;
tmp->Next =3D NULL;
tmp->ID =3D ++ID;
sprintf(tmp->Name, lang[7], ID);
tmp->Mesh =3D NULL;
tmp->Node =3D NULL; =20
wnd_Anfang.addRoom(tmp->Name, tmp->ID);
}
return ID;
}
[/CODE]
What's wrong ???
___________________________________________________________________
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof. Thank you.
|
|
From: <A_B...@gm...> - 2005-04-04 20:15:26
|
Hi,
I'm trying to create an flexible array.
I have a structure named roomDat.
At the 1st und 2nd call of addRoom() every thing seems to be OK, but the =
second time the
will no memory be reserved, because the ID is always 2 after the 1st call.=
..
[CODE]
extern roomDat* Raum;
int cSpiel::addRoom(){
/* TODO (AB#1#): neuen Raum erstellen, ID zur=FCckgeben */
int ID =3D 0;
if(!Raum){
Raum =3D (roomDat*)malloc(sizeof(roomDat));
Raum->Prev =3D NULL;
Raum->Next =3D NULL;
Raum->ID =3D ++ID;
sprintf(Raum->Name, lang[7], ID);
Raum->Mesh =3D NULL;
Raum->Node =3D NULL;
wnd_Anfang.addRoom(Raum->Name, Raum->ID);
}else{
roomDat* tmp =3D Raum;
roomDat* tmp2 =3D NULL;
while(tmp){
if(tmp->ID > ID) ID =3D tmp->ID;
tmp2 =3D tmp;
tmp =3D tmp->Next;
}
tmp =3D (roomDat*)malloc(sizeof(roomDat));
tmp->Prev =3D tmp2;
tmp->Next =3D NULL;
tmp->ID =3D ++ID;
sprintf(tmp->Name, lang[7], ID);
tmp->Mesh =3D NULL;
tmp->Node =3D NULL;
wnd_Anfang.addRoom(tmp->Name, tmp->ID);
}
return ID;
}
[/CODE]
What's wrong ???
|
|
From: Scott B. <doo...@ya...> - 2005-04-04 02:09:03
|
Hello, I'm trying to compile an IP Helper API example program from the MSDN website http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/notifyaddrchange.asp. However, although I have included libiphlpapi.a in the project options, I get a linker error : 'undefined reference to 'NotifyAddrChange@8'' I am using Dev C++ version 4.9.9.2. The compile log message is : Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\MyFiles\NetstatLog\NetstatEventDetected\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\MyFiles\NetstatLog\NetstatEventDetected\Makefile.win" all g++.exe -D__DEBUG__ main.o -o "NetworkEventDetected.exe" -L"lib" ../../../lib/libwsock32.a ../../../lib/libws2_32.a ../../../lib/libiphlpapi.a -g3 main.o(.text+0x148): In function `main': C:/Dev-Cpp/MyFiles/NetstatLog/NetstatEventDetected/main.cpp:17: undefined reference to `NotifyAddrChange@8' collect2: ld returned 1 exit status make.exe: *** [NetworkEventDetected.exe] Error 1 Execution terminated Does anybody know how I could fix this, please ? Scott Brown --------------------------------- Find local movie times and trailers on Yahoo! Movies. |
|
From: rohit b. <rv...@gm...> - 2005-04-03 15:27:24
|
I want to use the parallel port to control motor speed. A friend of mine created a buzzer program using dos.h/stdio.h in turbo c 3.0 using inportb(). i found nothing of that sort in Dev-C++. My aim will be to provide pulses at a pin every N milliseconds which will be opto-coupled to the control circuit. If possible, I'll take input from the motor about its speed so as to enable a feedback loop. This will essentially be a console program, as I know just that much. Any ideas about header files/functions is appreciated. -- Rohit V. Bhute http://rvbhute.freelinuxhost.com/ Using Firefox, Thunderbird and Sunbird |
|
From: Verne H. B. <ve...@sy...> - 2005-04-01 02:52:49
|
If your program isn't too large why not post it so others might try and see what's causing you problems. Who knows what can be found. Verne On Wed, 30 Mar 2005 11:06:02 +0100, Phil Stovell <ph...@st...> jotted some Wise Words of Wisdom: >I'm using wxdev-cpp beta 6.7 on Win 98 and Win ME machines. When I try to >debug >using the IDE, it crashes. I have PSAPI.DLL in the BIN directory, but when >I >invoke GDB.EXE manually, I get the message "The PSAPI.DLL file is linked to >missing export NTDLL.DLL:NtAllocateVirtualMemory". I've tried putting other >versions of NTDLL.DLL (found on the net) in the BIN directory to no avail. >A >websearch indicates the possibility of a virus, so I ran a virus scan and >ad-aware and spybot - nothing found. A couple of other users have reported >the >same error. > >I've reported it to the wxWidgets discussion forum: ><http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?t=1653&sid=ee6bf094801bf19a76a5a41973aab3d6> > >Can anybody advise what I'm doing wrong? I've solved this by installing GDB 5.1.1-1. It seems that PSAPI is for NT/2K/XP, 9X should use toolhelp. GDB must have been changed after 5.1. -- Phil Stovell, Hampshire, United Kingdom I do not reply to usenet posts containing ad hominems. Except in uk.politics.misc, of course, which is nothing but. ------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/info/Sentarus/hamr30 _______________________________________________ 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 |