dev-cpp-users Mailing List for Dev-C++ (Page 210)
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: <eng...@ju...> - 2004-06-09 05:59:30
|
Hi, The windows media control interface (MCI) docs should have some information on functions for media devices reporting errors. I'm not sure but MCI is probably what you would use to check the state of the cdrom drive. Hope this helped. Jim E. Smith ________________________________________________________________ The best thing to hit the Internet in years - Juno SpeedBand! Surf the Web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! |
|
From: Siva C. <siv...@ya...> - 2004-06-09 05:39:44
|
Hello, --- eng...@ju... wrote: > I would like to know if the C++ standard specifys > how the virtual fucntion tables are to implemented > by the compiler writers? As per Stan Lippman's "Inside C++ object model", the C++ standard does'nt specify how the virtual functions have to be implemented, leave alone virtual function tables! But vtable implementation was part of Stroustrup's original implementation and it matured as a "Standard" way of implementation. The copy I own is quite old and I am not aware of any changes. Hope this helps, Siva Chandra __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ |
|
From: <eng...@ju...> - 2004-06-09 05:21:28
|
Hi,
I'm sorry for not showing all of the code. Here it is:
class InternetConnection {
public:
............virtual int iconnect(...) =0; //Pure Virtual Method
};
class DSLConnection : public InternetConnection {
public:
............virtual int iconnect(...); //definition not shown
};
class ISDNConnection : public InternetConnection {
public:
............virtual int iconnect(...); //definition not shown
}
class DailupConnection : public InternetConnection {
public:
............. virtual int iconnect(...); //definition not shown
};
//////////////////////////////////////////////////////////////////////
////This class is not derived from InternetConnection
//////////////////////////////////////////////////////////////////////
class ExportedConnection {
public:
.........virtual int iconnect(...); //definition not shown
};
int main() {
InternetConnection *ic = new DSLConnection; //Derived from InternetConnection
InternetConnection *ic2 = new DailupConnection; //Derived from InternetConnection
ExportedConnection exported_object; //Not Derived from InternetConnection
ic->iconnect();
ic2->iconnect();
delete ic;
delete ic2;
//The cast to void* then assignment
(void*)ic=&exported_object; //Virtual function table pointer assignment via cast to void*
ic->iconnect(); //exported_object's method called
return 0;
}
This compiles on Linux using g++, Borland C++ and works with Borland Delphi and Borland C++ class objects. The VC++ compiler is implemented differently so Borland and VC++ objects might not work.
Thanks,
Jim E. Smith
________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
|
|
From: <eng...@ju...> - 2004-06-09 04:54:41
|
Hi, Does anyone know of a C or C++ library for converting raw video data into different formats? I'm reading raw video data from /dev/video on a Linux machine and I would like to convert it into a windows compatible format. I need to be able to compress it and send it over the network via the the Unix network APIs using TCP/IP and play it on another machine. I've already downloaded a library that converts the raw audio data into a format that windows can use. Now I need the raw video converted. I was thinking about writing the conversion routines myself, but that may take too much time because I'm not familiar with the formats. Thanks, James E. Smith ________________________________________________________________ The best thing to hit the Internet in years - Juno SpeedBand! Surf the Web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! |
|
From: Noorez K. <coo...@ho...> - 2004-06-09 04:38:51
|
1. How can i setup my programs to run automaticly when the cd ,where it is stored, is inserted into the drive?? And is it possible for this program to send a message to eject the cd with my program?? 2. How can I see get an error message from the command prompt into a program so that my program can handle the error. _________________________________________________________________ MSN Premium includes powerful parental controls and get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines |
|
From: <eng...@ju...> - 2004-06-09 04:32:56
|
Greetings,
I would like to know if the C++ standard specifys how the virtual fucntion tables are to implemented by the compiler writers? Also can any tell me if other languages besides Borland C++ and Borland Delphi have compatible object binaries?
Example Code:
class InternetConnection {
public:
............virtual int iconnect(...) =0; //Pure Virtual Method
};
class DSLConnection : public InternetConnection {
public:
............virtual int iconnect(...); //definition not shown
};
class ISDNConnection : public InternetConnection {
public:
............virtual int iconnect(...); //definition not shown
}
class DailupConnection : public InternetConnection {
public:
............. virtual int iconnect(...); //definition not shown
};
//////////////////////////////////////////////////////////////////////
////This class is not derived from InternetConnection
//////////////////////////////////////////////////////////////////////
class ExportedConnection {
public:
.........virtual int iconnect(...); //definition not shown
};
InternetConnection can point to a pointer of type ExportedConnection and execute the virtual functions of that class object. Are there any other languages that are compatible besides Borland Delphi and Borland C++? I'm aware that this works also on Unix with C++.
Thanks,
Jim E. Smith
________________________________________________________________
The best thing to hit the Internet in years - Juno SpeedBand!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
|
|
From: Homer S. <hom...@gm...> - 2004-06-08 17:45:33
|
A look at the online version of the MSDN-Library (http://msdn.microsoft.com/) could give you the right answer. Regards, Daniel Brian Downing wrote: > I need to use COLOREF to paint my windows background but I don't think > I'm linking the right library. Two questions: > > Which library or header should I include/link to for access to > COLOREF? I'm already linking to lgdi32. > > How do I know what each library contains when I'm looking for a > function? > > Thanks, Brian |
|
From: Guillermo G. <ggu...@ma...> - 2004-06-08 12:53:15
|
Any ideas on how to correct this? -----Original Message----- From: eng...@ju... [mailto:eng...@ju...] Sent: Monday, June 07, 2004 9:22 PM To: Guillermo Gutierrez Subject: Re: [Dev-C++] problem with rebuild Hi, I don't think this is a serious problem, the program still should = continue to build. The program that make.exe cannot find appears to be = the rm.exe. The rm.exe must not be in the path. James E. Smith E-mail: eng...@ju... ________________________________________________________________ The best thing to hit the Internet in years - Juno SpeedBand! Surf the Web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! |
|
From: Xia H. <xi...@sh...> - 2004-06-08 06:58:25
|
Thank God, I correct it. Due to charset. In Japanese windows2000, dev-cpp's charset is 128, which is Japanese charset, I change it to charset 0. it work properly. -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Xia Hua Sent: Tuesday, June 08, 2004 1:44 PM To: dev...@li... Subject: [Dev-C++] font change failed I installed the latest dev-cpp in Japanese windows 2000, but I could not change the font in editor options. And font in text editor area looks very strange: the space between characters become wider than normal. Current font is courier 10, And in dev-cpp 4, no such error happens. Who could tell me how to correct it? ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ 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: Xia H. <xi...@sh...> - 2004-06-08 05:44:40
|
I installed the latest dev-cpp in Japanese windows 2000, but I could not change the font in editor options. And font in text editor area looks very strange: the space between characters become wider than normal. Current font is courier 10, And in dev-cpp 4, no such error happens. Who could tell me how to correct it? |
|
From: <eng...@ju...> - 2004-06-08 04:29:02
|
---------- Forwarded Message ---------- Hi, I don't think this is a serious problem, the program still should continue to build. The program that make.exe cannot find appears to be the rm.exe. The rm.exe must not be in the path. James E. Smith E-mail: eng...@ju... ________________________________________________________________ The best thing to hit the Internet in years - Juno SpeedBand! Surf the Web up to FIVE TIMES FASTER! Only $14.95/ month - visit www.juno.com to sign up today! |
|
From: Guillermo G. <ggu...@ma...> - 2004-06-07 18:54:32
|
In my Dev-Cpp, v4.9.8.9, I just upgraded my mingw to 3.4 and when I = select Rebuild All from the Execute menu I get the following compiler = error: Compiler: Default compiler Building Makefile: = "W:\Dev-Cpp\GuillermoGutierrez\NydiaProgram\Makefile.win" Executing make clean rm -f ../NydiaProgram/main.o NydiaLove_private.res = ../ProjectExecutables/NydiaLoveLetter.exe process_begin: = CreateProcess((null), rm -f ../NydiaProgram/main.o NydiaLove_private.res = ../ProjectExecutables/NydiaLoveLetter.exe, ...) failed. make (e=3D2): The system cannot find the file specified. make.exe: *** = [clean] Error 2 Execution terminated The program I run this with still compiles and runs just fine. I am = curious what the error means. P.S. when the next version of Dev-Cpp w/full installer be out, I heard = that the new installer will have the latest version of the IDE and the = newest mingw (3.4) Guillermo Gutierrez Market Scan Information Systems Software Q.A. Supervisor (818) 575-2000 x2427 ggu...@ma... |
|
From: <co...@si...> - 2004-06-07 12:41:15
|
----- Original Message ----- From: <co...@si...> To: "Oliver Rogasch" <Dr_...@gm...> Cc: <dev...@li...> Sent: Monday, June 07, 2004 2:34 PM Subject: Re: [Dev-C++] using mspgcc-compiler in dev-c++ > > ----- Original Message ----- > From: <co...@si...> > To: "Oliver Rogasch" <Dr_...@gm...> > Cc: <dev...@li...> > Sent: Monday, June 07, 2004 1:56 PM > Subject: Re: [Dev-C++] using mspgcc-compiler in dev-c++ > Hi! Olli Success! I use Win2K SP4 and DEVCPP 4.9.8.7 I know that with Win95/98/XP you can find some problems with environment variables but ....... I send test project for DEVCPP 4.9.8.7 I have to add compiler MSPGCC to your compiler set in DEV and add binaries directory only MainMenu->Compiler options-> Directories-> Binaries I've: D:\LANG\mspgcc\msp430\bin Change according to your directories tree. In project options you have to change directories too. Good luck! Greetings, Collins > > > > ----- Original Message ----- > > From: "Oliver Rogasch" <Dr_...@gm...> > > To: <co...@si...> > > Sent: Friday, June 04, 2004 12:55 PM > > Subject: Re: [Dev-C++] using mspgcc-compiler in dev-c++ > > > > > > > Hi Collins, thx for this answer. > > > Here is the link to the mspgcc-site with download: > > > > > > http://mspgcc.sourceforge.net/ > > > > > > I've got a little older version installed mspgcc-20030506.exe, but this > > > shouldn't be a problem. :) > > > > > > Yours Olli > > > > > > -- > > > "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! > > > Jetzt aktivieren unter http://www.gmx.net/info > > > |
|
From: Singh, M. \(GE C. F. NonGE\) <mah...@ge...> - 2004-06-07 10:19:02
|
I have taken the latest DevC++, is that the reason.
-----Original Message-----
From: Damien A [mailto:g_...@ho...]
Sent: 07 June 2004 11:51
To: Singh, MahendraPratap (GE Commercial Finance, NonGE); =
dev...@li...
Subject: RE: [Dev-C++] Problem with resource file
Well, thats interesting. I get the same error as you IF i use the -v =
argument to windres, however if I do not, I don't get any errors.=20
----Original Message Follows----=20
From: "Singh, MahendraPratap (GE Commercial Finance, NonGE)" =
<mah...@ge...>=20
To: "Damien A" <g_...@ho...>, <dev...@li...> =
Subject: RE: [Dev-C++] Problem with resource file=20
Date: Mon, 7 Jun 2004 10:39:05 +0100=20
MIME-Version: 1.0=20
Sorry .. forget to inform you . I first tried with=20
windres menu.rc -o menu.o=20
I got the same error. i.e=20
F:\Cygwin\home\mahen\Personal\cpp>windres menu.rc -o menu.o=20
windres: can't popen `gcc -E -xc -DRC_INVOKED menu.rc': Invalid =
argument=20
then i looked into the help and added -v for verbose and -i to specify =
input file=20
it gives me the same error.=20
-----Original Message-----=20
From: Damien A [mailto:g_...@ho...]=20
Sent: 07 June 2004 11:34=20
To: Singh, MahendraPratap (GE Commercial Finance, NonGE); =
dev...@li...=20
Subject: RE: [Dev-C++] Problem with resource file=20
I said:=20
windres file.rc -o file.o=20
NOT=20
windres -v -i file.rc -o file.o=20
----Original Message Follows----=20
From: "Singh, MahendraPratap (GE Commercial Finance, NonGE)" =
<mah...@ge...>=20
To: "Damien A" <g_...@ho...>, <dev...@li...> =
Subject: RE: [Dev-C++] Problem with resource file=20
Date: Mon, 7 Jun 2004 10:28:56 +0100=20
MIME-Version: 1.0=20
Thanx for replying... I tried as you suggested but i am getting this =
error=20
F:\Cygwin\home\mahen\Personal\cpp>windres -v -i menu.rc -o menu.o=20
Using `gcc -E -xc -DRC_INVOKED menu.rc'=20
windres: can't popen `gcc -E -xc -DRC_INVOKED menu.rc': Invalid =
argument=20
I have the icon file in the same directory as the menu.rc file=20
Any suggestions=20
-----Original Message-----=20
From: Damien A [mailto:g_...@ho...]=20
Sent: 07 June 2004 11:03=20
To: Singh, MahendraPratap (GE Commercial Finance, NonGE); =
dev...@li...=20
Subject: RE: [Dev-C++] Problem with resource file=20
Assuming you know how to use the compiler at the command-line, type:=20
windres rcfile.rc -o rcfile.o=20
That will compile your resource file without errors, as long as you have =
the icon in the same folder. Then compile you .cpp file, and include =
the .o file compiled above. i.e type:=20
gcc main.cpp rcfile.o -o main.exe -mwindiws=20
And, it will work.=20
----Original Message Follows----=20
From: "Singh, MahendraPratap (GE Commercial Finance, NonGE)" =
<mah...@ge...>=20
To: <dev...@li...>=20
Subject: [Dev-C++] Problem with resource file=20
Date: Sun, 6 Jun 2004 18:38:56 +0100=20
MIME-Version: 1.0=20
_____=20
Add photos to your messages with MSN 8. =
<http://g.msn.com/8HMAEN/2749??PS=3D47575> Get 2 months FREE*.=20
_____=20
Help STOP spam with the new <http://g.msn.com/8HMAEN/2731??PS=3D47575> =
MSN 8 and get 2 months FREE*=20
_____ =20
Help STOP spam with the new <http://g.msn.com/8HMAEN/2731??PS=3D47575> =
MSN 8 and get 2 months FREE*=20
|
|
From: Singh, M. \(GE C. F. NonGE\) <mah...@ge...> - 2004-06-07 09:39:28
|
Sorry .. forget to inform you . I first tried with=20 windres menu.rc -o menu.o=20 I got the same error. i.e=20 F:\Cygwin\home\mahen\Personal\cpp>windres menu.rc -o menu.o windres: can't popen `gcc -E -xc -DRC_INVOKED menu.rc': Invalid = argument =20 then i looked into the help and added -v for verbose and -i to specify = input file=20 it gives me the same error.=20 =20 =20 -----Original Message----- From: Damien A [mailto:g_...@ho...] Sent: 07 June 2004 11:34 To: Singh, MahendraPratap (GE Commercial Finance, NonGE); = dev...@li... Subject: RE: [Dev-C++] Problem with resource file I said: windres file.rc -o file.o NOT windres -v -i file.rc -o file.o ----Original Message Follows----=20 From: "Singh, MahendraPratap (GE Commercial Finance, NonGE)" = <mah...@ge...>=20 To: "Damien A" <g_...@ho...>, <dev...@li...> = Subject: RE: [Dev-C++] Problem with resource file=20 Date: Mon, 7 Jun 2004 10:28:56 +0100=20 MIME-Version: 1.0=20 Thanx for replying... I tried as you suggested but i am getting this = error=20 F:\Cygwin\home\mahen\Personal\cpp>windres -v -i menu.rc -o menu.o=20 Using `gcc -E -xc -DRC_INVOKED menu.rc'=20 windres: can't popen `gcc -E -xc -DRC_INVOKED menu.rc': Invalid = argument=20 I have the icon file in the same directory as the menu.rc file=20 Any suggestions=20 -----Original Message-----=20 From: Damien A [mailto:g_...@ho...]=20 Sent: 07 June 2004 11:03=20 To: Singh, MahendraPratap (GE Commercial Finance, NonGE); = dev...@li...=20 Subject: RE: [Dev-C++] Problem with resource file=20 Assuming you know how to use the compiler at the command-line, type:=20 windres rcfile.rc -o rcfile.o=20 That will compile your resource file without errors, as long as you have = the icon in the same folder. Then compile you .cpp file, and include = the .o file compiled above. i.e type:=20 gcc main.cpp rcfile.o -o main.exe -mwindiws=20 And, it will work.=20 ----Original Message Follows----=20 From: "Singh, MahendraPratap (GE Commercial Finance, NonGE)" = <mah...@ge...>=20 To: <dev...@li...>=20 Subject: [Dev-C++] Problem with resource file=20 Date: Sun, 6 Jun 2004 18:38:56 +0100=20 MIME-Version: 1.0=20 _____=20 Add photos to your messages with MSN 8. = <http://g.msn.com/8HMAEN/2749??PS=3D47575> Get 2 months FREE*.=20 _____ =20 Help STOP spam with the new <http://g.msn.com/8HMAEN/2731??PS=3D47575> = MSN 8 and get 2 months FREE*=20 |
|
From: Singh, M. \(GE C. F. NonGE\) <mah...@ge...> - 2004-06-07 09:29:06
|
Thanx for replying... I tried as you suggested but i am getting this = error=20 =20 F:\Cygwin\home\mahen\Personal\cpp>windres -v -i menu.rc -o menu.o Using `gcc -E -xc -DRC_INVOKED menu.rc' windres: can't popen `gcc -E -xc -DRC_INVOKED menu.rc': Invalid = argument =20 I have the icon file in the same directory as the menu.rc file =20 Any suggestions -----Original Message----- From: Damien A [mailto:g_...@ho...] Sent: 07 June 2004 11:03 To: Singh, MahendraPratap (GE Commercial Finance, NonGE); = dev...@li... Subject: RE: [Dev-C++] Problem with resource file Assuming you know how to use the compiler at the command-line, type: windres rcfile.rc -o rcfile.o That will compile your resource file without errors, as long as you have = the icon in the same folder. Then compile you .cpp file, and include = the .o file compiled above. i.e type: gcc main.cpp rcfile.o -o main.exe -mwindiws =20 And, it will work. ----Original Message Follows----=20 From: "Singh, MahendraPratap (GE Commercial Finance, NonGE)" = <mah...@ge...>=20 To: <dev...@li...>=20 Subject: [Dev-C++] Problem with resource file=20 Date: Sun, 6 Jun 2004 18:38:56 +0100=20 MIME-Version: 1.0=20 _____ =20 Add photos to your messages with MSN 8. = <http://g.msn.com/8HMAEN/2749??PS=3D47575> Get 2 months FREE*.=20 |
|
From: Per W. <pw...@ia...> - 2004-06-07 05:59:51
|
p++ is something you do when you have allocated an array, to reach the
next object.
Never think that malloc() allocates objects of exact size. It may allocate
objects of any size >=3D the size you requested.
Never assume that multiple malloc() calls will allocate continuous memory.
They may be allocated from any part of the memory. Depending on
architecture and implementation of malloc() it might strive to allocate
new plocks with _lower_ address than previous allocations. Bseides, when
reusing previously released memory, the allocations might come at
completely random addresses.
/Per W
On Mon, 7 Jun 2004, [gb2312] Bruce jjs wrote:
> The pointer p is the head pointer of the link list.And the p1 is poin=
t to p's next link node.After I use the function malloc() to distribute con=
tinuous memory to p and p1.Why the the result of p1-p is 16 not 12 which is=
the size of the struct student?The p->next is a pointer to p's next link n=
ode,also ++p.But why p->next is not equal to ++p? Please forgive my ignoran=
ce,I hope someboby can tell me why.
> ---Thanks,
> Bruce.J
> /* ** ******************************** */
> The program run result is belove:
> The size of "int" is 4
> The size of "p->next" is 4
> The size of "struct student" is 12
> p->next =3D 8783360
> p1 =3D 8783360
> p =3D 8783344
> ++p =3D 8783356
> /* ******************************** */
>
> My program is list belove:
> #include <stdio.h>
> typedef struct student {
> int number;
> int grade;
> struct student *next;
> }student, *stuLink;
>
> main()
> {
> stuLink p, p1;
>
>
> p =3D (stuLink) malloc(sizeof(student));
> p1 =3D (stuLink) malloc(sizeof(student));
> p->next =3D NULL;
> p1->next =3D p->next;
> p->next =3D p1;
> printf("The size of int is %d\n", sizeof(int));
> printf("The size of p->next is %d\n", sizeof(p->next));
> printf("The size of struct student is %d\n", sizeof(Student));
> printf("p->next=3D%d\n", p->next);
> printf("p1=3D%d\n", p1);
> printf("p=3D%d\n", p);
> printf("++p=3D%d\n", ++p);
> free(p);
> free(p1);
> system("PAUSE");
> }
>
>
>
>
> ---------------------------------
> Do You Yahoo!?
> =CF=D3=D3=CA=CF=E4=CC=AB=D0=A1=A3=BF=D1=C5=BB=A2=B5=E7=D3=CA=D7=D4=D6=FA=
=C0=A9=C8=DD=A3=A1
|
|
From: <per...@ya...> - 2004-06-07 01:16:03
|
The pointer p is the head pointer of the link list.And the p1 is point to p's next link node.After I use the function malloc() to distribute continuous memory to p and p1.Why the the result of p1-p is 16 not 12 which is the size of the struct student?The p->next is a pointer to p's next link node,also ++p.But why p->next is not equal to ++p? Please forgive my ignorance,I hope someboby can tell me why.
---Thanks,
Bruce.J
/* ** ******************************** */
The program run result is belove:
The size of "int" is 4
The size of "p->next" is 4
The size of "struct student" is 12
p->next = 8783360
p1 = 8783360
p = 8783344
++p = 8783356
/* ******************************** */
My program is list belove:
#include <stdio.h>
typedef struct student {
int number;
int grade;
struct student *next;
}student, *stuLink;
main()
{
stuLink p, p1;
p = (stuLink) malloc(sizeof(student));
p1 = (stuLink) malloc(sizeof(student));
p->next = NULL;
p1->next = p->next;
p->next = p1;
printf("The size of int is %d\n", sizeof(int));
printf("The size of p->next is %d\n", sizeof(p->next));
printf("The size of struct student is %d\n", sizeof(Student));
printf("p->next=%d\n", p->next);
printf("p1=%d\n", p1);
printf("p=%d\n", p);
printf("++p=%d\n", ++p);
free(p);
free(p1);
system("PAUSE");
}
---------------------------------
Do You Yahoo!?
嫌邮箱太小?雅虎电邮自助扩容! |
|
From: Singh, M. \(GE C. F. NonGE\) <mah...@ge...> - 2004-06-06 17:39:09
|
I am new to DevC++ so please bare with me.
I have been reading the tutorial Win32 API Tutorial
by theForger.=20
According to the Chapter Menus and Icons in the tutorial, I have created =
a .c file, .h file and .rc file containing MENNU definition and ICON =
definition.
Just to inform you I created all this without creating any project.
When I complied the code , it compiles and runs but it does not show the =
menu and the icons.
So, I thought I have to create a project. So I created a project in the =
directory where I had my files. And I included the .c, .h and .rc file. =
And when I complied it gave me this error
###################################
Compiler: Default compiler
Building Makefile: "F:\Cygwin\home\mahen\Personal\cpp\Makefile.win"
Executing make...
make.exe -f "F:\Cygwin\home\mahen\Personal\cpp\Makefile.win" all
windres.exe -i Learning_private.rc -I rc -o Learning_private.res -O coff =
windres.exe: can't popen `gcc -E -xc -DRC_INVOKED Learning_private.rc': =
Invalid argument
make.exe: *** [Learning_private.res] Error 1
Execution terminated
##################################
This is the content of the .h file
#################################
#define IDR_MYMENU 101
#define IDI_MYICON 201
#define ID_FILE_EXIT 9001
#define ID_STUFF_GO 9002
##################################
This is the content of .rc file
##################################
#include "resource.h"
IDR_MYMENU MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "E&xit", ID_FILE_EXIT
END
=20
POPUP "&Stuff"
BEGIN
MENUITEM "&Go", ID_STUFF_GO
MENUITEM "G&o Somewhere else", 0, GRAYED
END
END
IDI_MYICON ICON "menu_one.ico"
##################################
and this the code of .c file
#################################
#include <windows.h>
#include "resource.h"
const char g_szClassName[] =3D "myWindowClass";
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM =
lParam) {
switch(msg) {
case WM_CLOSE:=20
DestroyWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_MOUSEWHEEL : {
char szFileName[MAX_PATH];
HINSTANCE hInstance =3D GetModuleHandle(NULL);
=20
GetModuleFileName(hInstance, szFileName, MAX_PATH);
MessageBoxA(hwnd, szFileName, "Mahen Testing", MB_OK | =
MB_ICONINFORMATION);
} =20
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam); =20
} =20
} =20
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR =
lpCmdLine, int nCmdShow) {
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;
wc.cbSize =3D sizeof(WNDCLASSEX);
wc.style =3D 0;
wc.lpfnWndProc =3D WndProc;
wc.cbClsExtra =3D 0;
wc.cbWndExtra =3D 0;
wc.hInstance =3D hInstance;
wc.hIcon =3D LoadIcon(GetModuleHandle(NULL), =
MAKEINTRESOURCE(IDI_MYICON));
wc.hCursor =3D LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground =3D (HBRUSH)(COLOR_BTNFACE);
wc.lpszMenuName =3D MAKEINTRESOURCE(IDR_MYMENU);
wc.lpszClassName =3D g_szClassName;
wc.hIconSm =3D (HICON)LoadImage(GetModuleHandle(NULL), =
MAKEINTRESOURCE(IDI_MYICON), IMAGE_ICON, 16, 16, 0);
=20
if(!RegisterClassEx(&wc)) {
MessageBox(NULL, "Window Registration Failed!", "Error!", =
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
=20
hwnd =3D CreateWindowEx(
WS_EX_CLIENTEDGE,
g_szClassName,
"Testing Window",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
240, 120,
NULL, NULL, hInstance, NULL);
=20
if(hwnd =3D=3D NULL) {
MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
=20
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
=20
while(GetMessageA(&Msg, NULL, 0, 0) > 0) {
TranslateMessage(&Msg);
DispatchMessage(&Msg);
} =20
=20
return Msg.wParam;
=20
} =20
#################################
And this is the text of the Makefile.win which DevC++ created
################################
# Project: Learning
# Makefile created by Dev-C++ 4.9.8.9
CPP =3D g++.exe -D__DEBUG__
CC =3D gcc.exe -D__DEBUG__
WINDRES =3D windres.exe
RES =3D Learning_private.res
OBJ =3D simple_window.o $(RES)
LINKOBJ =3D simple_window.o $(RES)
LIBS =3D -L"D:/Dev-Cpp/lib" -lgmon -pg -g3=20
INCS =3D -I"D:/Dev-Cpp/include"=20
CXXINCS =3D -I"D:/Dev-Cpp/include/c++" =
-I"D:/Dev-Cpp/include/c++/mingw32" -I"D:/Dev-Cpp/include/c++/backward" =
-I"D:/Dev-Cpp/include"=20
BIN =3D Learning.exe
CXXFLAGS =3D $(CXXINCS) -pg -g3
CFLAGS =3D $(INCS) -pg -g3
.PHONY: all all-before all-after clean clean-custom
all: all-before Learning.exe all-after
clean: clean-custom
rm -f $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CC) $(LINKOBJ) -o "Learning.exe" $(LIBS)
simple_window.o: simple_window.c
$(CC) -c simple_window.c -o simple_window.o $(CFLAGS)
Learning_private.res: Learning_private.rc menu.rc=20
$(WINDRES) -i Learning_private.rc -I rc -o Learning_private.res -O coff =
##################################
Please help me as I want to learn this Win32API and am new to it.
Thanx
Mahendra
|
|
From: Damien A <g_...@ho...> - 2004-06-05 23:09:33
|
<html><div style='background-color:'><DIV class=RTE> <P>1) Its actually COLOR<STRONG>R</STRONG>EF (2 R's). Just include windows.h, and don't compile for console ( set it in the Dev-C++ options, or pass -mwindows to gcc/ g++ at the commandline ), and you should be fine. </P> <P>2) Ususally, we try to find out which library contains the function we are using ( to stop linker errors ), not find out all the functions in a library. Anytime you are learning a new topic ( e.g windows programming ), whatever tutorial you use usually tells you what libraries you need to link to, in order to prevent linking errors. MSDN (<A href="http://msdn.microsoft.com">http://msdn.microsoft.com</A>) is a good source for info on windows programming. It tells you what headers and libraries are required for a particular function. A simple translation (e.g instead of gdi32.lib, we use -lgdi32) is all that is needed to compile it successfully in Dev-C++.</P> <P>----Original Message Follows---- </P></DIV> <DIV></DIV>From: "Brian Downing" <Bri...@ms...> <DIV></DIV>To: "dev-cpp-users" <dev...@li...> <DIV></DIV>Subject: [Dev-C++] COLOREF, libraries <DIV></DIV>Date: Sat, 5 Jun 2004 08:47:28 -0700 <DIV></DIV>MIME-Version: 1.0 <DIV></DIV> <DIV></DIV> <DIV></DIV> <P> </P> <P>I need to use COLOREF to paint my windows background but I don't think I'm linking the right library. Two questions: </P> <DIV></DIV> <DIV></DIV>Which library or header should I include/link to for access to COLOREF? I'm already linking to lgdi32. <DIV></DIV> <DIV></DIV>How do I know what each library contains when I'm looking for a function? <DIV></DIV> <DIV></DIV>Thanks, Brian <DIV></DIV></div><br clear=all><hr>MSN 8 helps <a href="http://g.msn.com/8HMBEN/2743??PS=47575">ELIMINATE E-MAIL VIRUSES. </a> Get 2 months FREE*.</html> |
|
From: Brian D. <Bri...@ms...> - 2004-06-05 15:48:16
|
I need to use COLOREF to paint my windows background but I don't think = I'm linking the right library. Two questions: Which library or header should I include/link to for access to COLOREF? = I'm already linking to lgdi32. How do I know what each library contains when I'm looking for a = function? =20 Thanks, Brian |
|
From: Scott S. <age...@co...> - 2004-06-05 14:06:45
|
On www.flipcode.com under development tutorials, they have a quick start guide to CVS. -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Dmitry Sidorov Sent: Thursday, June 03, 2004 10:26 PM To: dev...@li... Subject: [Dev-C++] CVS Hello all! How could I use cvs with devc++ ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ 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: Michael K. <mic...@gm...> - 2004-06-04 13:07:13
|
Hi,
For a parallel programming project I use MPI to send messages. Using MPI I
have to define the type of the data buffer contained in the message.
Something like:
MPI_Send(&myInt, 1, MPI_INT, ...)
where MPI_INT is denotes that myInt is of type int. I now have the problem
that I have templated classes and want to send some class members:
template<class MyType>
class MyClass ...
(...)
MyType a;
(...)
MPI_Send(&a, 1, ...)
Obviously there is not predefined MPI_Datatype like MPI_MyType... Therefore
I use Traits:
MPI_Send(&a, 1, MPITraits<MyType>::datatype(), ...)
The MPITraits definition looks as follows:
----
#ifndef __MPITraits_h
#define __MPITraits_h
#include "mpi.h"
#include "itkCovariantVector.h"
template < class T >
class MPITraits {
public:
static inline MPI_Datatype datatype();
};
template <>
class MPITraits< signed char > {
public:
static inline MPI_Datatype datatype() {
return MPI_CHAR;
}
};
template <>
class MPITraits< signed short int > {
public:
static inline MPI_Datatype datatype() {
return MPI_SHORT;
}
};
(...)
----
Now I have some more complex datatypes than just char, int and so on that
are templated as well. I have, for example
template < >
class MPITraits< itk::CovariantVector<double, 2> > {
public:
static inline MPI_Datatype datatype() {
MPI_Datatype covariant_vector_type;
MPI_Type_contiguous(2, MPI_DOUBLE, &covariant_vector_type);
MPI_Type_commit(&covariant_vector_type);
return covariant_vector_type;
}
};
Obviously it is not nice to write a new MPITraits entry for each combination
of <anothertype, dimension> of CovariantVector. I would like to be able to
somehow replace the MPI_Type_contiguous line with something like:
MPI_Type_contiguous(dimension, MPITraits<anothertype>::datatype(),
&covariant_vector_type);
Is there a way to do this (or something similar)?
Or is there a way to give a user a chance to define exactly the Traits
entries that are used in his application when the MPI_Send commands are in a
class within a library?
Thanks,
Michael
--
+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
|
|
From: Per W. <pw...@ia...> - 2004-06-04 11:22:26
|
There are no "the implementation" of the malloc(9 and free() functions. They are different for all runtime libraries, i.e. depends on what compiler and target system you are using. However, if you google you can find source code for a number of implementations, sunch as the code used in the gcc project. /Per W On Fri, 4 Jun 2004, [gb2312] Bruce jjs wrote: > I want to know the implement of the function malloc() and free() wr= ited in ANSI C.Can someone tell me where I can find it? > ---Thanks, > Bruce.J > > > > --------------------------------- > Do You Yahoo!? > =CF=D3=D3=CA=CF=E4=CC=AB=D0=A1=A3=BF=D1=C5=BB=A2=B5=E7=D3=CA=D7=D4=D6=FA= =C0=A9=C8=DD=A3=A1 |
|
From: <per...@ya...> - 2004-06-04 09:57:12
|
I want to know the implement of the function malloc() and free() writed in ANSI C.Can someone tell me where I can find it? ---Thanks, Bruce.J --------------------------------- Do You Yahoo!? 嫌邮箱太小?雅虎电邮自助扩容! |