dev-cpp-users Mailing List for Dev-C++ (Page 549)
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: Daniel G. <sp...@ho...> - 2002-07-30 07:46:14
|
Hi everyone, I want to create a basic exception class so my constructors can throw objects if they fail. Constructors will be the only things that throw exceptions, but the class will most likely be expanded in the future so other functions can throw. What do I need to include in an exception class? I think an error log text file would be good (I've done them before using ofstream objects) but what data members should the file have? I've not done these before so any suggestions would be great. Daniel _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
|
From: Teodorescu C. <te...@xt...> - 2002-07-30 07:44:11
|
Met...@ao... wrote: > Hi there > > I need to display some "help bubbles" on some icons of my dialog-based > proggy, like you can see on some HTML pages or on DevCPP toolbar. > > I cannot find any sourcecode or "how-to" guidelines anywhere on the > net. Maybe I did not searched the right way.... > > Anybody could help ? > > Kind regards > > -- > > Seb I think that are called balloons in WinXp http://www.codeproject.com/miscctrl/balloonhelp.asp ok you will find there mfc way. Stay translate it into api or use VC++ :-) that's why i said i love Microsoft :: do it in api way best regards teo |
|
From: Ramana K. <ra...@my...> - 2002-07-30 07:40:13
|
I have the feeling that I am missing something fundamental in my
understanding of the sizeof operator or multidimensional arrays when I get
these results:
--------snip----------
String Substitutions[][2] = //String is a user-defined class
{
"I'M","I AM",
"YOU'RE","YOU ARE",
"HE'S","HE IS",
"SHE'S","SHE IS",
"IT'S","IT IS",
"WE'RE","WE ARE",
"THEY'RE","THEY ARE"
};
bool SomeFunc(String s)
{
s.Substitute(Substitutions); //pass multidimensional array to member
function
}
--------snip----------
--------snip----------
void String::Substitute(String sub[][2]) //passed Substitutions here
{
String ss[][2] = //exact replica of Substitutions
{
"I'M","I AM",
"YOU'RE","YOU ARE",
"HE'S","HE IS",
"SHE'S","SHE IS",
"IT'S","IT IS",
"WE'RE","WE ARE",
"THEY'RE","THEY ARE"
};
if(sizeof(ss)!=sizeof(sub)) //sizeof identical arrays
{
MessageBox(NULL,"Error","Error",MB_OK);
}
}
--------snip----------
Compiles fine. The MessageBox always appears when running, indicating that
the size of those two identical arrays are different! Obviously something to
do with pointers and passing arrays to functions or something like this is
messing up the operation of the sizeof operator. Anyone have any ideas?
|
|
From: <Met...@ao...> - 2002-07-30 07:09:50
|
Hi there I need to display some "help bubbles" on some icons of my dialog-based proggy, like you can see on some HTML pages or on DevCPP toolbar. I cannot find any sourcecode or "how-to" guidelines anywhere on the net. Maybe I did not searched the right way.... Anybody could help ? Kind regards -- Seb |
|
From: Teodorescu C. <te...@xt...> - 2002-07-30 05:47:32
|
Abhijit Shylanath wrote: >><Ioannis Vranos words> >>Well a C++ version of Dev-C++ would have much fewer bugs since we all >>would be able to correct them and why not addd additiona, facilities. >></Ioannis Vranos words> >> >>I think Ioannis is right... It is not only that we could help to linux >>version but >>we could help to windoze version; so we all can improve Dev-C++ >> >> >development > > >>adding functionalities, fixin bugs, etc... >> >>It's just my vote for "Ioannis campaign for president" anyway... ;oP >> >>Best regards, Santy >> >> > >I dunno, it seems to me that porting Dev to C++ from Delphi would be almost >like writing a whole new IDE form the ground up... which *is* an idea, but >is pointless since Dev's come so far. > Yes but sometimes we need a drawback to adavced faster and i think i it will be ported to c++ more fast that anybody think. Don't forget all here are c++ programers and if only 10% will help .... > > > >------------------------------------------------------- >This sf.net email is sponsored by: Dice - The leading online job board >for high-tech professionals. Search and apply for tech jobs today! >http://seeker.dice.com/seeker.epl?rel_code=31 >_______________________________________________ >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: Carrard <ca...@un...> - 2002-07-29 22:38:05
|
<P>Hello!</P> <P>I need, urgently, one C++ debugger to use in Windows environment. This debbuger <BR>shoud be a visual interface and work with Dev-C++/GDB, like DDD in Linux <BR>operation system. Does anyone can help me?</P> <P>Thanks,</P> <P>Marcos</P><br /> <br /> ________________________________________________<br /> Este E-mail foi enviado Usando o Software WEBMAIL 1.0<br /> |
|
From: Abhijit S. <mu...@gm...> - 2002-07-29 18:14:18
|
> <Ioannis Vranos words> > Well a C++ version of Dev-C++ would have much fewer bugs since we all > would be able to correct them and why not addd additiona, facilities. > </Ioannis Vranos words> > > I think Ioannis is right... It is not only that we could help to linux > version but > we could help to windoze version; so we all can improve Dev-C++ development > adding functionalities, fixin bugs, etc... > > It's just my vote for "Ioannis campaign for president" anyway... ;oP > > Best regards, Santy I dunno, it seems to me that porting Dev to C++ from Delphi would be almost like writing a whole new IDE form the ground up... which *is* an idea, but is pointless since Dev's come so far. |
|
From: Teodorescu C. <te...@xt...> - 2002-07-29 11:54:46
|
Ioannis Vranos wrote: >>-----Original Message----- >>From: dev...@li... >>[mailto:dev...@li...] On Behalf >>Of Hongli Lai >>Sent: Saturday, July 27, 2002 5:04 PM >>To: Ioannis Vranos >>Cc: Dev-C++ Mailing List >>Subject: Re: [Dev-C++] Kylix 3 >> >> >>Ioannis Vranos wrote: >> >> >> >>>*Kylix 3 is out. Perhaps is it time a Dev-C++ version for >>> >>> >>GNU/Linux (& >> >> >>>Winblowz) written in C++ to be created?* >>>** >>> >>> >>> >>Rewriting Dev-C++ is useless and counterproductive. It won't make any >>difference other than being "language politically correct". >>And there already are good IDEs for Linux. >>http://www.kdevelop.org/ >>http://anjuta.sourceforge.net/ >> >> > > >Well a C++ version of Dev-C++ would have much fewer bugs since we all >would be able to correct them and why not addd additiona, facilities. > > > > See archives in this matter. I 've seen a lot of mails on this ideea >Ioannis > >* Ioannis Vranos >* Programming pages: http://www.noicys.cjb.net >* Alternative URL: http://run.to/noicys > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >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: Hongli L. <h....@ch...> - 2002-07-29 10:41:47
|
On Mon, 2002-07-29 at 10:24, Santiago Palmier Campos wrote: > <Ioannis Vranos words> > Well a C++ version of Dev-C++ would have much fewer bugs since we all > would be able to correct them and why not addd additiona, facilities. > </Ioannis Vranos words> > > I think Ioannis is right... It is not only that we could help to linux > version but > we could help to windoze version; so we all can improve Dev-C++ development > adding functionalities, fixin bugs, etc... > > It's just my vote for "Ioannis campaign for president" anyway... ;oP > If you want to rewrite Dev-C++, be my guest, but I'm not going to try to do such a huge task. And I'd rather see the efford going into improving KDevelop or Anjuta, rather than rewriting Dev-C++ in order to support both Linux and Windows and GNU autoconf/automake and Dev-C++'s Windows compilation system. |
|
From: Santiago P. C. <San...@yd...> - 2002-07-29 09:35:05
|
<Ioannis Vranos words> Well a C++ version of Dev-C++ would have much fewer bugs since we all would be able to correct them and why not addd additiona, facilities. </Ioannis Vranos words> I think Ioannis is right... It is not only that we could help to linux version but we could help to windoze version; so we all can improve Dev-C++ development adding functionalities, fixin bugs, etc... It's just my vote for "Ioannis campaign for president" anyway... ;oP Best regards, Santy -------------------------------------------------------------------------------------- This message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. No confidentiality or privilege is waived or lost by any wrong transmission. If you have received this message in error, please immediately destroy it and kindly notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Opinions, conclusions and other information in this message that do not relate to the official business of Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it. -------------------------------------------------------------------------------------- |
|
From: Ioannis V. <no...@ho...> - 2002-07-29 08:04:18
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Ioannis Vranos
> Sent: Monday, July 29, 2002 10:42 AM
> To: 'Abhijit Shylanath'
> Cc: 'Dev-C++ Mailing List'
> Subject: RE: [Dev-C++] Static members for callbacks
>
> >
> > > -----Original Message-----
> > > From: Abhijit Shylanath [mailto:mu...@gm...]
> > > Sent: Monday, July 29, 2002 9:50 AM
> > > To: Ioannis Vranos
> > > Cc: Dev-C++ Mailing List
> > > Subject: Re: [Dev-C++] Static members for callbacks
> > >
> > >
> > > > > You can't use non-static methods for windows
> callbacks (like in
> > > > > CreateThread(), SetWindowsHookEx()) which need you to suppply
> > > > > a call-back
> > > > > function.
> > > >
> > > >
> > > > This is too Win32 to me. What do you mean by call-back
> > > function. Can you
> > > > provide a small concrete example?
> > >
> > >
> > > Basically, typedef function_pointer call_back;
> > >
> > > For example, in CreateThread(), the args are:
> > >
> > > HANDLE CreateThread(
> > > LPSECURITY_ATTRIBUTES lpThreadAttributes, // address of
> > > thread security
> > > attributes
> > > DWORD dwStackSize, // initial thread stack size, in bytes
> > > LPTHREAD_START_ROUTINE lpStartAddress, // address of
> > > thread function
> > > LPVOID lpParameter, // argument for new thread
> > > DWORD dwCreationFlags, // creation flags
> > > LPDWORD lpThreadId // address of returned thread identifier
> > > );
> > >
> > > Here, LPTHREAD_START_ROUTINE should be a function pointer
> > to a 32-bit
> > > returning (void *) accepting function, as in
> > >
> > > DWORD my_thread_proc(void *some_arg);
> > >
> > > where DWORD is, on Win32, unsigned long.
> >
> >
> >
> > Ok then you can use a regular function to call the
> > appropriate member function. This regular function will
> > accept also your object as a parameter.
>
>
> In general use an additional regular function. For example if your
> function must have a specific return type and specific arguments like:
>
> int s(void *);
>
>
> You can use a third function *& a global variable e.g.
>
>
> // The value of the data member of class A
>
> int x;
>
> inline void loadvalue(const A &a)
> {
> x=a.getvalue();
> }
>
>
> // s now can read the global variable x
>
>
> Of course this way sucks. But this is not a C++ problem, but Win32
> problem which after all is C (or perhaps even pre-ANSI C).
>
> In C there is some use of global variables like errno,
> although the use
> of global variables is not recommended there too.
Sorry for the many messages but i have to be perfect. :)
The best way to do it given the Win32 API limitations is to do the above
using the modular programming paradigm (which was the ancestor of OO but
is a concrete paradigm of its own). That is define those things in a
namespace:
namespace dirty_work
{
// Values of the object's data members
int x, y, z;
inline void loadvalue(const A &a)
{
x=a.getvalue();
}
}
int s(void *);
// ...
A a(3,2,1);
// ...
dirty_work::loadvalue(a);
// s can now read the values of a from dirty_work::x etc.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ho...> - 2002-07-29 07:42:38
|
> -----Original Message-----
> From: Ioannis Vranos [mailto:no...@ho...]
> Sent: Monday, July 29, 2002 10:34 AM
> To: 'Abhijit Shylanath'
> Cc: 'Dev-C++ Mailing List'
> Subject: RE: [Dev-C++] Static members for callbacks
>
>
> > -----Original Message-----
> > From: Abhijit Shylanath [mailto:mu...@gm...]
> > Sent: Monday, July 29, 2002 9:50 AM
> > To: Ioannis Vranos
> > Cc: Dev-C++ Mailing List
> > Subject: Re: [Dev-C++] Static members for callbacks
> >
> >
> > > > You can't use non-static methods for windows callbacks (like in
> > > > CreateThread(), SetWindowsHookEx()) which need you to suppply
> > > > a call-back
> > > > function.
> > >
> > >
> > > This is too Win32 to me. What do you mean by call-back
> > function. Can you
> > > provide a small concrete example?
> >
> >
> > Basically, typedef function_pointer call_back;
> >
> > For example, in CreateThread(), the args are:
> >
> > HANDLE CreateThread(
> > LPSECURITY_ATTRIBUTES lpThreadAttributes, // address of
> > thread security
> > attributes
> > DWORD dwStackSize, // initial thread stack size, in bytes
> > LPTHREAD_START_ROUTINE lpStartAddress, // address of
> > thread function
> > LPVOID lpParameter, // argument for new thread
> > DWORD dwCreationFlags, // creation flags
> > LPDWORD lpThreadId // address of returned thread identifier
> > );
> >
> > Here, LPTHREAD_START_ROUTINE should be a function pointer
> to a 32-bit
> > returning (void *) accepting function, as in
> >
> > DWORD my_thread_proc(void *some_arg);
> >
> > where DWORD is, on Win32, unsigned long.
>
>
>
> Ok then you can use a regular function to call the
> appropriate member function. This regular function will
> accept also your object as a parameter.
In general use an additional regular function. For example if your
function must have a specific return type and specific arguments like:
int s(void *);
You can use a third function *& a global variable e.g.
// The value of the data member of class A
int x;
inline void loadvalue(const A &a)
{
x=a.getvalue();
}
// s now can read the global variable x
Of course this way sucks. But this is not a C++ problem, but Win32
problem which after all is C (or perhaps even pre-ANSI C).
In C there is some use of global variables like errno, although the use
of global variables is not recommended there too.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ho...> - 2002-07-29 07:34:12
|
> -----Original Message----- > From: Abhijit Shylanath [mailto:mu...@gm...] > Sent: Monday, July 29, 2002 9:50 AM > To: Ioannis Vranos > Cc: Dev-C++ Mailing List > Subject: Re: [Dev-C++] Static members for callbacks > > > > > You can't use non-static methods for windows callbacks (like in > > > CreateThread(), SetWindowsHookEx()) which need you to suppply > > > a call-back > > > function. > > > > > > This is too Win32 to me. What do you mean by call-back > function. Can you > > provide a small concrete example? > > > Basically, typedef function_pointer call_back; > > For example, in CreateThread(), the args are: > > HANDLE CreateThread( > LPSECURITY_ATTRIBUTES lpThreadAttributes, // address of > thread security > attributes > DWORD dwStackSize, // initial thread stack size, in bytes > LPTHREAD_START_ROUTINE lpStartAddress, // address of > thread function > LPVOID lpParameter, // argument for new thread > DWORD dwCreationFlags, // creation flags > LPDWORD lpThreadId // address of returned thread identifier > ); > > Here, LPTHREAD_START_ROUTINE should be a function pointer to a 32-bit > returning (void *) accepting function, as in > > DWORD my_thread_proc(void *some_arg); > > where DWORD is, on Win32, unsigned long. Ok then you can use a regular function to call the appropriate member function. This regular function will accept also your object as a parameter. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Abhijit S. <mu...@gm...> - 2002-07-29 06:59:22
|
> Hello! > > I have browsed through the dev-cpp forum but I have not found an answer > to my question there, so I ask here: On Windows 2000, is it possible to > set up dev-cpp 4.9.4.1 for multiple users? I think Dev uses the files 'devcpp.ini' and 'devcpp.cfg' for its config. I've written a program to share files between users (so every user can have his/her own copy of a file), I think you can use it for Dev. The URL is http://mudeth.tripod.com/useragent.htm. -------------------------- "2 + 2 is 5 for extremely large values of 2." -------------------------- Checked with NAV 2002 http://mudeth.tripod.com |
|
From: Abhijit S. <mu...@gm...> - 2002-07-29 06:51:37
|
> > You can't use non-static methods for windows callbacks (like in
> > CreateThread(), SetWindowsHookEx()) which need you to suppply
> > a call-back
> > function.
>
>
> This is too Win32 to me. What do you mean by call-back function. Can you
> provide a small concrete example?
Basically, typedef function_pointer call_back;
For example, in CreateThread(), the args are:
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes, // address of thread security
attributes
DWORD dwStackSize, // initial thread stack size, in bytes
LPTHREAD_START_ROUTINE lpStartAddress, // address of thread function
LPVOID lpParameter, // argument for new thread
DWORD dwCreationFlags, // creation flags
LPDWORD lpThreadId // address of returned thread identifier
);
Here, LPTHREAD_START_ROUTINE should be a function pointer to a 32-bit
returning (void *) accepting function, as in
DWORD my_thread_proc(void *some_arg);
where DWORD is, on Win32, unsigned long.
PS: Sorry for a double-post of the previous message. I thought it hadn't got
through,
so I reposted it, after which I received the original message... I guess the
list server is acting up...
|
|
From: Abhijit S. <mu...@gm...> - 2002-07-29 06:34:15
|
> > Okay, so this is how it's done... thanks. But this means that > > you can't use > > non-static methods for external callbacks (like Windows') directly. > > > Can you explain the above? You can't use non-static methods for windows callbacks (like in CreateThread(), SetWindowsHookEx()) which need you to suppply a call-back function. |
|
From: Ioannis V. <no...@ho...> - 2002-07-28 21:09:20
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Abhijit Shylanath > Sent: Sunday, July 28, 2002 11:15 AM > To: Dev-C++ Mailing List > Subject: Re: [Dev-C++] Static members for callbacks > > > > > Okay, so this is how it's done... thanks. But this means that > > > you can't use > > > non-static methods for external callbacks (like Windows') > directly. > > > > > > Can you explain the above? > > You can't use non-static methods for windows callbacks (like in > CreateThread(), SetWindowsHookEx()) which need you to suppply > a call-back > function. This is too Win32 to me. What do you mean by call-back function. Can you provide a small concrete example? I am learning .NET myself which is c00l and fully OO (and very easy) and it has nothing to do with Win32 but that's another story. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Abhijit S. <mu...@gm...> - 2002-07-28 20:43:38
|
> > Okay, so this is how it's done... thanks. But this means that > > you can't use > > non-static methods for external callbacks (like Windows') directly. > > > Can you explain the above? You can't use non-static methods for windows callbacks (like in CreateThread(), SetWindowsHookEx()) which need you to suppply a call-back function. |
|
From: Nils T. <nil...@gm...> - 2002-07-28 10:31:58
|
Hello! I have browsed through the dev-cpp forum but I have not found an answer to my question there, so I ask here: On Windows 2000, is it possible to set up dev-cpp 4.9.4.1 for multiple users? TIA Nils Trebing -- +++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++ -- (Terry Pratchett, Hogfather) |
|
From: Luigi S. <gi...@li...> - 2002-07-27 16:23:08
|
At 14.04 07/25/02 -0700, Andrew Jenkins wrote: >hi, >I call a header file (tree.h) from two c files(main.c & tree.c)... when I >do this, an int fileNo gets declared twice, because the header is called >twice, twice causing a linker error. I then add: >#ifndef TREE_H >#define TREE_H >//functions and struct here >int fileNo = 0; >#endif > >for some reason that didnt keep the compiler from reading the contents of >tree.h multiple times... im rather stumped, it almost seems like its >ignoring all the preprocessor commands except #include altogether. i cant >imagine any linker params that id need to set but im not sure. > >im running version 4.9.4.2 of dev and in compiler options, I have all 3 c >compiler options selected. > >anyone have any ideas? > >Thanks. Hi, I'll try to give an explanation, it makes sense to me, hopefully to you too. The "#ifndef" stuff, is used to avoid that a file is included more than once within the *same* compilation unit, not across *different* units. Here is an example that could better explain what I mean. "main.c" and "tree.c" are two compilation units. Each of them requires the header file "tree.h" be included. In fact "main.c" needs it because a Tree is used within function "main", and "tree.c" needs it to make sure function definitions and declarations are consistent. Suppose instead that you had this situation: - "main.c" includes the headers: "containers.h" and "tree.h" - "containers.h" includes the header "tree.h" - "tree.c" includes "tree.h" In the above situation, if you do not use the "#ifndef", you will see the content of "tree.h" included twice within "main.c" (so compilation time is a bit longer, as there is more to be parsed). If you use "#ifndef", only once will content of "tree.h" be included: since once is enough, you should always use the "#ifdef". A good rule is: always bound code, within an header file, by a "#ifndef" ... "#endif" Note that "tree.h" is included in "tree.c", without any regard of the "#ifndef", had it not been that way, keeping declarations and definitions consisten, would be a lot harder to achieve. Now an idea to solve your problem. It looks like "fileNo" is a global variable: you should only declare it within the header file "tree.h" (so that every compilation unit which uses it, knows what it is), and that define it within one compilation unit only (I guess "tree.c", since it is related to a Tree). extern int fileNo; /* this goes in "tree.h" */ int fileNo = 0; /* this goes in "tree.c" */ -- gisan |
|
From: Ioannis V. <no...@ho...> - 2002-07-27 14:14:55
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Hongli Lai > Sent: Saturday, July 27, 2002 5:04 PM > To: Ioannis Vranos > Cc: Dev-C++ Mailing List > Subject: Re: [Dev-C++] Kylix 3 > > > Ioannis Vranos wrote: > > > *Kylix 3 is out. Perhaps is it time a Dev-C++ version for > GNU/Linux (& > > Winblowz) written in C++ to be created?* > > ** > > > > > Rewriting Dev-C++ is useless and counterproductive. It won't make any > difference other than being "language politically correct". > And there already are good IDEs for Linux. > http://www.kdevelop.org/ > http://anjuta.sourceforge.net/ Well a C++ version of Dev-C++ would have much fewer bugs since we all would be able to correct them and why not addd additiona, facilities. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Hongli L. <h....@ch...> - 2002-07-27 13:58:22
|
Ioannis Vranos wrote: > *Kylix 3 is out. Perhaps is it time a Dev-C++ version for GNU/Linux (& > Winblowz) written in C++ to be created?* > ** > Rewriting Dev-C++ is useless and counterproductive. It won't make any difference other than being "language politically correct". And there already are good IDEs for Linux. http://www.kdevelop.org/ http://anjuta.sourceforge.net/ |
|
From: Ioannis V. <no...@ho...> - 2002-07-27 13:43:52
|
Kylix 3 is out. Perhaps is it time a Dev-C++ version for GNU/Linux (& Winblowz) written in C++ to be created? Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-07-27 13:21:09
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Abhijit Shylanath
> Sent: Saturday, July 27, 2002 11:26 AM
> To: Dev-C++ Mailing List
> Subject: Re: [Dev-C++] Static members for callbacks
>
>
> > #include <iostream>
> >
> >
> > int main()
> > {
> > class A
> > {
> > public:
> > void something() { std::cout<<"Hello, new world!\n"; }
> > }a;
> >
> > void (A::*pf)()=&A::something;
>
> Okay, so this is how it's done... thanks. But this means that
> you can't use
> non-static methods for external callbacks (like Windows') directly.
Can you explain the above?
> Waitaminit... in what you've done above, aren't all objects'
> 'pf's set to
> A::something? What if I want one object's pf pointing to
> something, and
> another object's pf poiting to something_else?
Contrary to what you may thing a member function is unique for every
class. The only difference is that a *this pointer is passed to it in
addition to the other arguments and the compiler makes some additional
magic so as to behave as if there is one for each object (it uses *this
to permit you acccess the private members directly in the style
void A::something(void)
{
x++;
}
where x is a private member.
So if you have the above member function you can use void (A::*pf)() to
point to it and it will act the same "indepedently" on every object of
the class where it is called.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Abhijit S. <mu...@gm...> - 2002-07-27 09:02:07
|
> You can have a function pointer to point to some member functions. But a
> non-static member function is not a regular function, that's why we use
> special-kind of pointers (a static function on the other hand is a
> regular function).
>
> #include <iostream>
>
>
> int main()
> {
> class A
> {
> public:
> void something() { std::cout<<"Hello, new world!\n"; }
> }a;
>
> void (A::*pf)()=&A::something;
Okay, so this is how it's done... thanks. But this means that you can't use
non-static methods for external callbacks (like Windows') directly.
Waitaminit... in what you've done above, aren't all objects' 'pf's set to
A::something? What if I want one object's pf pointing to something, and
another object's pf poiting to something_else?
|