dev-cpp-users Mailing List for Dev-C++ (Page 2)
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
(2) |
2
(2) |
3
(9) |
4
(11) |
5
(15) |
6
(5) |
7
|
8
(1) |
9
(2) |
10
(8) |
11
(4) |
12
(4) |
13
(5) |
14
(5) |
15
(10) |
16
(14) |
17
(7) |
18
(2) |
19
|
20
(7) |
21
(12) |
22
(6) |
23
|
24
(4) |
25
(6) |
26
(16) |
27
(9) |
28
(7) |
29
(18) |
30
(9) |
|
|
|
|
|
|
From: <Zoo...@ao...> - 2001-09-29 12:13:03
|
Hi ! I've just read the FAQ on bloodshed.net for Dev-C++. It explains the right syntax for including asm in C++ source code. But as I don't know the assembly language, it wasn't very helpful to me. I'd like to do a graphic interrupt (13h for example). Can someone tell me the correct syntax to launch an interrupt ? how to do this ? |
From: colombianomoren0 <col...@ne...> - 2001-09-29 05:00:02
|
How can I get my getch function to work? I keep receiving the errror = "implicit declaration of function `int getchar(...)". |
From: Todd R. <tr...@ce...> - 2001-09-28 15:02:39
|
Hi: I am new to Dev-C++. Sometimes I get "Out of Memory" errors when I try to close windows in a project. The file does not have to have a lot of code in it. In fact the file can be empty and produce the problem. Has anybody encountered this? If so, is there a remedy? Thanks! |
From: JS <jsc...@gm...> - 2001-09-28 12:17:45
|
Well you may use the timeticks as described in an email before - but you will have to integrate several ticks in order to get a clear value : I would reset a frames counter to zero and save the number of ticks into startticks then wait at least 100 frames - and read the ticks counter and store a new starttickvalue FPS =3D 100 *1000 * 10 / (newtickvalue - starttickvalue) 100 frames * 1000 millis * 10 accuracy factor why do i explain this easy math ? - well 100 frames should be used for precision / accuracy : windows reports not the real ticks - but a difference of some milliseoncs. taking only the ticks between one frame would lead to inacurate values. 100 is a good choice / compromise bettween accurr. and speed. if your app leads to nuch less then 100 frames per second - the value might be reduced - try to obtain at least around 1000 ticks after having calculate a new actual FPS value , perform a smoothing : average =3D average - (average >> 2) + (newvalue >> 2) where 2 or more (up to eg 5) increases smoothing after this oldvalue =3D oldvalue - (oldvalue >> 2) + (newvalue >> 2) value 2 above is dynamic hysteresis and avoids toggling (might be up to 4, where larger means quicker !!!) if ((average > (oldvalue + 4) or (average < (oldvalue - 4) )-> oldvalue =3D average; screenupdate using average / 10; value 2 above is static hysteresis and avoids toggling (might be up to 4, where smaller means quicker) remember : value avarage / 10 ist the real FPS -> see accuracy factor j=FCrgen On 25 Sep 2001, at 23:00, Stein Nyg=E5rd wrote: > Hi all... > > I's been a while, cause I've been busy setting up my new Athlon 1400mhz. > It's working great, so now I'm ready to move on with the OpenGL! > So, I just can't figure out how to make a good, fast and precise > FramesPerSecond-Counter. Any suggestions? > Thanks! > > Stein > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Michael C. <jd...@ho...> - 2001-09-28 12:14:04
|
Hi, This is a snippett of code I have written in the past. It was written for HPUX 10.20 so there may be slight variations in your Windows example. Just ignore the #define stuff. #include <time.h> # define LG_COUT_TIMED(streamExpr) \ do { \ const int DATE_LEN = 100; \ time_t t; \ tm tm_s; \ char date [DATE_LEN]; \ if ((time (&t) != (time_t) -1) && (localtime_r(&t, &tm_s) == 0)) \ { \ strftime (date, DATE_LEN, "%c", &tm_s); \ cout << date << " : "; \ } \ cout << streamExpr << endl; \ } while (false) >From: "Ricky boytoy" <boy...@ho...> >Reply-To: dev...@li... >To: dev...@li... >Subject: [Dev-C++] i need help >Date: Fri, 28 Sep 2001 12:01:34 +0000 > >hey there hope u guys r in great shape! >i need so examples of using the headerfile time.h in c++ > >cud u just tell me some basic functions of time.h >i look forward to hear from u >thank u > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Ricky b. <boy...@ho...> - 2001-09-28 12:01:42
|
hey there hope u guys r in great shape! i need so examples of using the headerfile time.h in c++ cud u just tell me some basic functions of time.h i look forward to hear from u thank u _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: JS <jsc...@gm...> - 2001-09-28 11:26:44
|
Hello i used the method shown in the example hello to print into a windows - but i did not succeed in placing variables there ! I also could not print at another point of the programm - somehow the window is not updated (allthough i induced this) ------ a second question would be - howto place a variables value and also normal text into a grafik screen - i used the open gl app to turn it into my desired prog. all works fine but i do not know, how to place a text (some explanations) and running vaklues into it. any help ? example code ? |
From: JS <jsc...@gm...> - 2001-09-28 11:24:03
|
sorry i cannot help you in this - but i made the same experiences : sometimes the textcolour works the wrong way - even if i set every text individually before . one thing i recognized is, that text, which is allready on the screen - printed to correct way !- suddenly changes colour the next time - becaus of another text fragment having a different colour (somehow the console emulation must have caused this) i also discovered problems with goto(x,y) - it mostly works - but sometimes the is a miscalculation - however. in one case i had to place the cursor with goto(x,y) and the perform a char 13 return to get into the desired line - from this point on the next gotoxy work ! On 3 Aug 2001, at 11:22, bretek wrote: > Hello! > > I have problems with textcolor() and cprintf() functions. I > included conio.h to the source and added c:\Dev- > C++\Lib\conio.o to "Further Object Files" in Project > Options (as I had read in FAQ), but cprintf() has not > operate well. I.e after textcolor(RED) cprintf() sometimes > (but not always) > prints characters with the default LIGHTGREY colour. What > can I do? Is this bug fixed in version 4.01 ? Should I use > a special compiler option? > > (Excuse my poor English.) > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: graeme <gr...@dr...> - 2001-09-28 02:20:38
|
>I having serious problems with my projects... I would like to split my code >up into some different files, to make it more ease to navigate. But, when I >put functions all around different files, they cant call eachother, if that >makes any sense. file02.cpp needs to know about function bob which is defined in file file02.cpp. However it is much better practice to #include header files, the header files will then include the prototype of the functions that you wish to call hence: main.cpp: #include "file02.hpp" // Note don't need to include file01.hpp because this file only uses weird void main(void) { weird(); //works Ok :/ } file01.hpp: void bob(void); file02.cpp: void weird(void); file01.cpp: #include "file01.hpp" void bob(void) { blabla } file02.cpp: #include "file01.hpp" #include "file02.hpp" // Need to include file02.hpp because of the call to bob. void weird(void) { bob(void) //isn't working! } Hope that helps. Once you get that working you might want to consider using pre-processor directives to conditionally include a header file these are useful to avoid declaring the contents of a header file more than once in a programme and follow a standard template: #ifndef __FILE01_HPP__ #define __FILE01_HPP__ // include the header file declarations here #endif Cheers, Graeme. |
From: Anton T. <ant...@ch...> - 2001-09-27 20:23:36
|
hi, if i iunderstand you right, you should use header files. basically, the function 'bob' which you call from within file02 has to = be declared in file02. a declaration is just the function head and a = terminating semicolon, i. e. void bob(void); in your file02, before you first use bob(). but when function 'bob' along with other functions from file01 is used = in many files, that's much work. on the other hand, you cannot include = file01 in file02, because file01 would then be included twice in = main.cpp. so you should create a header file for 'file01.cpp', name it 'file01.h' = and include it in every file that uses things from file01.cpp: file01.h: blabla void bob(void); // declaration blabla file02.cpp: blabla #include "file01.h" blabla bob(); if you use this mechanism (.h / .cpp), you should, maybe later, also use = it in your main.cpp. hope i could help you. anton tichawa ----- Original Message -----=20 From: Stein Nyg=E5rd <ste...@ge...> To: <dev...@li...> Sent: Thursday, September 27, 2001 7:47 PM Subject: [Dev-C++] Project in DevCpp4 (files 'n stuff) > Hi all! >=20 > I having serious problems with my projects... I would like to split my = code > up into some different files, to make it more ease to navigate. But, = when I > put functions all around different files, they cant call eachother, if = that > makes any sense. >=20 > Example: >=20 > main.cpp: >=20 > #include "file01.cpp" > #include "file02.cpp" > void main(void) > { > wierd(); file://works Ok :/ > } >=20 > file01.cpp: > void bob(void) > { > blabla > } >=20 >=20 > file02.cpp: > void wierd(void) > { > bob(void) file://isn't working! > } >=20 >=20 > And the files ARE include to my project, and everything seems to be = right, > but it isn't working for me... what's wrong?? >=20 > Thanks! :) > Stein >=20 >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: <ste...@ge...> - 2001-09-27 17:47:48
|
Hi all! I having serious problems with my projects... I would like to split my code up into some different files, to make it more ease to navigate. But, when I put functions all around different files, they cant call eachother, if that makes any sense. Example: main.cpp: #include "file01.cpp" #include "file02.cpp" void main(void) { wierd(); //works Ok :/ } file01.cpp: void bob(void) { blabla } file02.cpp: void wierd(void) { bob(void) //isn't working! } And the files ARE include to my project, and everything seems to be right, but it isn't working for me... what's wrong?? Thanks! :) Stein |
From: Lorenzo <co...@in...> - 2001-09-27 16:02:18
|
This is a small example to create a menu. ---------------------------------------------------------------------------- --- If debugging is the process of removing bugs, then programming must be the process of putting them in. ---------------------------------------------------------------------------- --- |
From: Ameer K. <sm...@vs...> - 2001-09-27 13:17:47
|
Hi friends, I am having Dev C++ version 4 installed . I have tried to create a Window with menu items using Dev C++ but failed. I have sought help through this mailing list to get advise for = rectifying the compiler error., but no result.. Can any body help me by sending a sample, tested code for creating a window with File menu, menu items Open,Save and Exit, = which compiles in Dev C++ version 4. I like Dev C++, in all other respect but could not create a=20 Window menu using this. With regards Ameer khan sm...@vs... |
From: Ioannis V. <no...@ya...> - 2001-09-27 12:41:30
|
standard library is all the functions and classes you are provided by the language and are defined in the header files like <iostream> e.t.c.. =20 =20 Ioannis =20 * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com <http://www.noicys.f2s.com/>=20 * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Juan Manuel Alvarez Baez Sent: Wednesday, September 26, 2001 1:57 AM To: dev...@li... Subject: [Dev-C++] C++ Mail List I want to make a question about C++, please, forgive me if this is very stupid: =20 My book says I must get accustomed to standard libraries. But, which are them? Where are them?. How will I recognize one if I saw it?=20 =20 I would relly appreciate if someone asked to this silly post. Thank you! Juan Manuel Alvarez B=E1ez Nicaragua Onl...@am...=20 |
From: Joseph, B. & E. V. <bl...@ho...> - 2001-09-27 10:57:48
|
in reply to: hello again everyone. i was wondering if anyone knows of any good = DirectX sites or tutorials. thanks ian. Even the NeHe tutorials reference DirectX so it probably is a good idea = to have some knowledge of it if you are going to write some Windoze = games. Here is a site that will show you how to get Dev-C++ to compile DirectX = stuff: http://www.gamecoding.co.uk/ Good Luck, Blumojo |
From: Juan M. A. B. <onl...@ho...> - 2001-09-27 10:15:26
|
I want to make a question about C++, please, forgive me if this is very = stupid: My book says I must get accustomed to standard libraries. But, which are = them? Where are them?. How will I recognize one if I saw it?=20 I would relly appreciate if someone asked to this silly post. Thank you! Juan Manuel Alvarez B=E1ez Nicaragua Onl...@am...=20 |
From: Lorenzo <co...@in...> - 2001-09-27 08:05:22
|
The solution of Anton Tichawa is right, but you can use the standard function "time" that is independent from the platform. eg. #include <time.h> int main(int argc, char **argv) { time_t start, end; start = time(0); my_algorithm(); end = time(0); // end - start is the number of seconds to run the my_algorithm(); } ---------------------------------------------------------------------------- --- If debugging is the process of removing bugs, then programming must be the process of putting them in. ---------------------------------------------------------------------------- --- |
From: Anton T. <ant...@ch...> - 2001-09-27 07:24:12
|
hi, Urmila calculating the time of an algorithm can be difficult and also depends = on the hardware and software environment. but you can measure the time = using a system clock, for example under Win32: int started; int runtime; started =3D GetTickCount(); // started =3D milliseconds since win was = started my_algorithm(); runtime =3D GetTickCount() - started; now 'runtime' holds the number of milliseconds elapsed. if the = resolution is poor, just call 'my_algorithm' many times: int started; int runtime; started =3D GetTickCount(); // started =3D milliseconds since win was = started for (int i =3D 0; i < 1000000; i++) my_algorithm(); runtime =3D GetTickCount() - started; hope this could help. anton tichawa. ----- Original Message -----=20 From: Urmila Samanta <ums...@cc...> To: <dev...@li...> Sent: Thursday, September 27, 2001 12:03 AM Subject: [Dev-C++] Re: Dev-cpp-users digest, Vol 1 #433 - 3 msgs > Hi, >=20 > My name is Urmila. I want to know if in C++ there is a built in > function > that will calculate the running time of an algorithm, and if so how do > you use it? >=20 > Urmila >=20 > On > Wed, 26 Sep 2001 dev...@li... wrote: >=20 > > Send Dev-cpp-users mailing list submissions to > > dev...@li... > >=20 > > To subscribe or unsubscribe via the World Wide Web, visit > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > or, via email, send a message with subject or body 'help' to > > dev...@li... > >=20 > > You can reach the person managing the list at > > dev...@li... > >=20 > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Dev-cpp-users digest..." > >=20 > >=20 > > Today's Topics: > >=20 > > 1. RE: C++ standard - Nesting classes. (Ioannis Vranos) > > 2. RE: C++ standard - Nesting classes. (Ioannis Vranos) > > 3. Building DLLs (Rodrigo Hjort) > >=20 > > --__--__-- > >=20 > > Message: 1 > > From: "Ioannis Vranos" <no...@ya...> > > To: <dev...@li...> > > Subject: RE: [Dev-C++] C++ standard - Nesting classes. > > Date: Wed, 26 Sep 2001 20:33:01 +0200 > > Reply-To: dev...@li... > >=20 > > Win32 API is old, MFC is old. .NET will have a different system call > > class hierarchy called BCL (Base Class Library). So why learn legacy > > stuff? > >=20 > > For now, if you can't wait for .NET i suggest you Borland C++ = Builder > > and its class hierarchy called VCL (Visual Class Library). It is a = lot > > higher level than MFC/Win32 crap. For accuracy it is a very high = level > > Win32 wrapper. It covers anything and you will probably never need = to > > write win32 crap. Also, Borland RAD/VCL is more high level than the > > RAD/BCL which will come with Visual Studio 7 and .NET in general. > > Dev-C++ does not cover of course VCL, but i am telling you the best > > solution for Windows programming (the best thing for you) for now. = The > > book "C++ Builder 5 Developer's Guide" by Sams Publishing comes with = a > > trial version of the Borland's IDE and this is also the book i = suggest > > you read for this particular IDE. > >=20 > > As for "The C++ Programming Language" 3rd edition or special = edition, > > i suggest you read it all from cover to cover (although it will take > > about 1-2 years). Reading for example 2-3 pages/day is a good speed, > > with no much brain overhead and what you learn will not get wasted = since > > C++ will not change. :) > >=20 > >=20 > > Ioannis > >=20 > > * Ioannis Vranos > > * Programming pages: http://www.noicys.f2s.com > > * Alternative URL: http://run.to/noicys > >=20 > >=20 > > > -----Original Message----- > > > From: dev...@li...=3D20 > > > [mailto:dev...@li...] On Behalf=3D20 > > > Of Jason Hardman > > > Sent: Wednesday, September 26, 2001 5:29 PM > > > To: dev...@li... > > > Subject: Re: [Dev-C++] C++ standard - Nesting classes. > > >=3D20 > > >=3D20 > > > Perhaps I should have been a little more clearer in the=3D20 > > > wording I used. What am doing is declaring one class which is=3D20 > > > the primary class that provides the functionality I am coding=3D20 > > > (a glorified state storage object in this case), and that=3D20 > > > class has other classes declared within it. These internal=3D20 > > > class declerations are private and so it shoudn't be possible=3D20 > > > to instantiate an object from one of these classes from=3D20 > > > outside the object. The Example from Ioannis Vranos=3D20 > > > (thanks)shows this quite well. > > >=3D20 > > > class A > > > { > > > public: > > > enum errors{MEMORY, DISK, MONITOR}; > > >=3D20 > > > private: > > > class E > > > { > > > errors e; > > >=3D20 > > > public: > > > E(errors er):e(er) {} > > > }; > > >=3D20 > > > }; > > >=3D20 > > > int main() > > > { > > > A a; > > >=3D20 > > > A::errors e; > > >=3D20 > > > A::E x(e); // Mistake, E is private > > > } > > >=3D20 > > > This compiles under Dev - C++ with MinGW, but not with=3D20 > > > Borland C++ 5.5. > > >=3D20 > > > Declaring a class doesn't create an instance of it, but AFAIK=3D20 > > > it should still be subject to the access specifier it was=3D20 > > > declared under. This is probably a known issue for MinGW,=3D20 > > > although I haven't had a chance to check that yet. > > >=3D20 > > > By the way, I already have Bjarn Stroustrup's book. I already=3D20 > > > knew how to code in C++ before getting it so never really=3D20 > > > read it all the way through, but I use it whenever I want=3D20 > > > know about the best approach to a design. It has a lot of=3D20 > > > useful information although there are easier books to use as=3D20 > > > a reference. > > >=3D20 > > > I have very little experience of Windows programming myself,=3D20 > > > but that something else I am trying to learn at this point.=3D20 > > > Any suggestions by anyone as to a good Windows API book would=3D20 > > > be appreciated by the way. Whenever I find a Windows book it=3D20 > > > is primarily about using MFC to write windows programs, but I=3D20 > > > don't have access to MFC at the moment so it's pretty useless to = me. > > >=3D20 > > > Thanks all, Jason. > > >=3D20 > > > PS: sorry about blathering on and on, I do that alot. :-D > > >=3D20 > > > ----- Original Message ----- > > > From: "Michael Codadeen" <jd...@ho...> > > > To: <dev...@li...> > > > Sent: Wednesday, September 26, 2001 8:39 AM > > > Subject: Re: [Dev-C++] C++ standard - Nesting classes. > > >=3D20 > > >=3D20 > > > > Hi Jason, > > > > > > > > The standard states that anything in your private area is = only=3D20 > > > > accessable > > > by > > > > that class. Not even public derived classes of that class=3D20 > > > can access=3D20 > > > > it. > > > > > > > > The protected area is accessable by public derived classes of = that=3D20 > > > > class. > > > In > > > > effect it becomes the private area of that derived class. = Also,=3D20 > > > > classes of the same type that get passed into an object as=3D20 > > > an argument=3D20 > > > > may have their protected area accessed. > > > > > > > > i.e. > > > > > > > > Class A { > > > > public: > > > > inline mthd(Class A& obj){cout << obj.data << endl;}; > > > > protected: > > > > data; > > > > } > > > > > > > > Class A a, b; > > > > a.mthd(b); << object a can access b protected area. > > > > > > > > The public area of a class can be accessed by anyone. > > > > > > > > The story is slightly different for protected and private = derived=3D20 > > > > classes. For more info get Stroustrups book. > > > > > > > > http://www.research.att.com/~bs/ > > > > > > > > I would not usually have a class called main, I would=3D20 > > > normally have a > > > public > > > > static main() function and tell my compiler which class = contains=3D20 > > > > main(). However, I guess this changes when you are Windows=3D20 > > > programming=3D20 > > > > of which I have no experience. > > > > > > > > Could you send an example of what you are doing so we could=3D20 > > > help some > > > more. > > > > > > > > Thanks, > > > > > > > > Michael > > > > > > > > >From: "Jason Hardman" <jas...@bt...> > > > > >Reply-To: dev...@li... > > > > >To: "Dev-C++" <dev...@li...> > > > > >Subject: [Dev-C++] C++ standard - Nesting classes. > > > > >Date: Wed, 26 Sep 2001 03:03:24 +0100 > > > > > > > > > >Hi, > > > > > > > > > >In a project I have been working on I have nested some=3D20 > > > classes within=3D20 > > > > >a main class that provides an overall functionality. I=3D20 > > > wanted to make=3D20 > > > > >these internal classes inaccessible to anyone using the=3D20 > > > main class. I=3D20 > > > > >had hoped that putting them in a private or protected area of = the=3D20 > > > > >main class it > > > would > > > > >stop outside access, but this doesn't seem to work in = Dev-C++=3D20 > > > > >(MinGW). > > > Does > > > > >anyone know if that is standard C++ behaviour? None of my=3D20 > > > C++ books=3D20 > > > > >say anything about access specifiers and nested classes,=3D20 > > > and they say=3D20 > > > > >pretty little about nested classes full-stop. It could=3D20 > > > reasonally be=3D20 > > > > >that only data and methods are affected by access specifiers, = but=3D20 > > > > >it's hard for me to be sure. > > > > > > > > > >I am now looking for an alternative way of hiding those = classes,=3D20 > > > > >although > > > I > > > > >have found some interesting options in using an = implementation=3D20 > > > > >namespace, > > > I > > > > >am still interesting in hearing any other ideas? > > > > > > > > > >Thanx, Jason. > > > > > > > > > > > > > > >_______________________________________________ > > > > >Dev-cpp-users mailing list Dev...@li... > > > > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > > > > > = _________________________________________________________________ > > > > Get your FREE download of MSN Explorer at=3D20 > > > > http://explorer.msn.com/intl.asp > > > > > > > > > > > > _______________________________________________ > > > > Dev-cpp-users mailing list Dev...@li... > > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >=3D20 > > >=3D20 > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >=3D20 > >=20 > >=20 > >=20 > > --__--__-- > >=20 > > Message: 2 > > From: "Ioannis Vranos" <no...@ya...> > > To: <dev...@li...> > > Subject: RE: [Dev-C++] C++ standard - Nesting classes. > > Date: Wed, 26 Sep 2001 20:34:30 +0200 > > Reply-To: dev...@li... > >=20 > > Stroustrup has a link at his pages for a pdf of a very recent draft = for > > the standard. > >=20 > >=20 > > Ioannis > >=20 > > * Ioannis Vranos > > * Programming pages: http://www.noicys.f2s.com > > * Alternative URL: http://run.to/noicys > >=20 > >=20 > > > -----Original Message----- > > > From: dev...@li...=3D20 > > > [mailto:dev...@li...] On Behalf=3D20 > > > Of Jason Hardman > > > Sent: Wednesday, September 26, 2001 4:56 PM > > > To: dev...@li... > > > Subject: Re: [Dev-C++] C++ standard - Nesting classes. > > >=3D20 > > >=3D20 > > > Thanks for that. I don't currently have any other compilers=3D20 > > > on my system so hadn't thought to check. I know that the=3D20 > > > Borland Compiler is probably the most standard compliant=3D20 > > > compiler available, so the fact that it didn't work on it=3D20 > > > probably meens it is standard. > > >=3D20 > > > I guess I'll have to inquire of the MinGW development=3D20 > > > community to see about them adding compliance. Thinking of=3D20 > > > all this I remember hearing about a website that contains a=3D20 > > > copy of the C++ standard, does anyone know where it it? I=3D20 > > > will be searching for it, but it would be easier if somebody=3D20 > > > already knows about it. > > >=3D20 > > > Thanks, Jason. > > >=3D20 > > > ----- Original Message ----- > > > From: "Ioannis Vranos" <no...@ya...> > > > To: <dev...@li...> > > > Sent: Wednesday, September 26, 2001 1:11 PM > > > Subject: RE: [Dev-C++] C++ standard - Nesting classes. > > >=3D20 > > >=3D20 > > > You are right. The following code compiles in Dev-C++: > > >=3D20 > > > class A > > > { > > > public: > > > enum errors{ MEMORY, DISK, MONITOR}; > > >=3D20 > > > private: > > > class E > > > { > > > errors e; > > >=3D20 > > > public: > > > E(errors er):e(er) {} > > > }; > > >=3D20 > > > }; > > >=3D20 > > > int main() > > > { > > > A a; > > >=3D20 > > > A::errors e; > > >=3D20 > > > A::E x(e); // Mistake, E is private > > > } > > >=3D20 > > >=3D20 > > > This shouldn't compile, so i consider it a compiler defect.=3D20 > > > Borland C++ 5.5 gives the (expected) error: > > >=3D20 > > > Error E2247 temp.cpp 23: 'A::E' is not accessible in function = main() > > > *** 1 errors in Compile *** > > >=3D20 > > >=3D20 > > > Ioannis > > >=3D20 > > > * Ioannis Vranos > > > * Programming pages: http://www.noicys.f2s.com > > > * Alternative URL: http://run.to/noicys > > >=3D20 > > >=3D20 > > >=3D20 > > > > -----Original Message----- > > > > From: dev...@li... > > > > [mailto:dev...@li...] On=3D20 > > > Behalf Of Jason=3D20 > > > > Hardman > > > > Sent: Wednesday, September 26, 2001 4:03 AM > > > > To: Dev-C++ > > > > Subject: [Dev-C++] C++ standard - Nesting classes. > > > > > > > > > > > > Hi, > > > > > > > > In a project I have been working on I have nested some=3D20 > > > classes within=3D20 > > > > a main class that provides an overall functionality. I=3D20 > > > wanted to make=3D20 > > > > these internal classes inaccessible to anyone using the=3D20 > > > main class. I=3D20 > > > > had hoped that putting them in a private or protected area=3D20 > > > of the main=3D20 > > > > class it would stop outside access, but this doesn't seem to = work > > > > in Dev-C++ (MinGW). Does anyone know if that is standard C++ > > > > behaviour? None of my C++ books say anything about access > > > > specifiers and nested classes, and they say pretty little > > > > about nested classes full-stop. It could reasonally be that > > > > only data and methods are affected by access specifiers, but > > > > it's hard for me to be sure. > > > > > > > > I am now looking for an alternative way of hiding those = classes,=3D20 > > > > although I have found some interesting options in using an=3D20 > > > > implementation namespace, I am still interesting in hearing=3D20 > > > any other=3D20 > > > > ideas? > > > > > > > > Thanx, Jason. > > > > > > > > > > > > _______________________________________________ > > > > Dev-cpp-users mailing list Dev...@li... > > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > >=3D20 > > >=3D20 > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >=3D20 > > >=3D20 > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >=3D20 > >=20 > >=20 > >=20 > > --__--__-- > >=20 > > Message: 3 > > From: "Rodrigo Hjort" <rod...@ac...> > > To: "Dev-C++ Users List" <dev...@li...> > > Date: Wed, 26 Sep 2001 15:11:08 -0300 > > Subject: [Dev-C++] Building DLLs > > Reply-To: dev...@li... > >=20 > > This is a multi-part message in MIME format. > >=20 > > ------=3D_NextPart_000_0070_01C1469D.78339220 > > Content-Type: text/plain; > > charset=3D"iso-8859-1" > > Content-Transfer-Encoding: quoted-printable > >=20 > > Dear Dev-C++ users, > >=20 > > I'm trying to build a DLL to use with other applications made in = Delphi =3D > > and VB. > > The code below is a very simple DLL I tried to make using Dev-C++. > >=20 > > It compiles perfectly and creates the DLL file. > > But appears the warning: "no export definition file provided; = dllwrap =3D > > will create one, but may not be what you want". > > I noticed that it uses the file "dll.def" and modifies the name of = the =3D > > function in the DLL to "TimesTwo__Fi". > >=20 > > I created a .DEF file, which is below, that I wanted the linker to = use. =3D > > How could be this possible? > > Does anyone have a simple DLL made with Dev-C++, in C language? > >=20 > > Thanks in advance, > >=20 > > Rodrigo Hjort > > rod...@ac... > >=20 > >=20 > > **** C source code ***** > > #include <windows.h> > >=20 > > int WINAPI _export TimesTwo(int x); > > /* int extern TimesTwo(int x); */ /*also tried this*/ > >=20 > > BOOL WINAPI DllEntryPoint(HINSTANCE hinstDLL,=3D20 > > DWORD fdwReason, LPVOID lpvReserved) > > { > > switch (fdwReason) > > { > > case DLL_PROCESS_ATTACH: break; > > case DLL_THREAD_ATTACH: break; > > case DLL_PROCESS_DETACH: break; > > case DLL_THREAD_DETACH: break; > > } > > return TRUE; > > } > >=20 > > int WINAPI _export TimesTwo(int x) > > /*int extern TimesTwo(int x)*/ > > { > > return x * 2; > > } > > ************************* > >=20 > >=20 > > *** DEF file ****** > > LIBRARY Sample > > DESCRIPTION 'SAMPLE DLL' > > CODE PRELOAD MOVABLE DISCARDABLE > > DATA PRELOAD SINGLE > > EXPORTS > > TimesTwo > > ******************* > >=20 > > ------=3D_NextPart_000_0070_01C1469D.78339220 > > Content-Type: text/html; > > charset=3D"iso-8859-1" > > Content-Transfer-Encoding: quoted-printable > >=20 > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > <HTML><HEAD> > > <META content=3D3D"text/html; charset=3D3Diso-8859-1" =3D > > http-equiv=3D3DContent-Type> > > <META content=3D3D"MSHTML 5.00.2314.1000" name=3D3DGENERATOR> > > <STYLE></STYLE> > > </HEAD> > > <BODY bgColor=3D3D#ffffff> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2> > > <DIV>Dear Dev-C++ users,</DIV> > > <DIV> </DIV> > > <DIV>I'm trying to build a DLL to use with other applications made = in =3D > > Delphi and=3D20 > > VB.</DIV> > > <DIV>The code below is a very simple DLL I tried to make using =3D > > Dev-C++.</DIV> > > <DIV> </DIV> > > <DIV>It compiles perfectly and creates the DLL file.</DIV> > > <DIV>But appears the warning: "no export definition file provided; = =3D > > dllwrap will=3D20 > > create one, but may not be what you want".</DIV> > > <DIV>I noticed that it uses the file "dll.def" and modifies the name = of =3D > > the=3D20 > > function in the DLL to "TimesTwo__Fi".</DIV> > > <DIV> </DIV> > > <DIV>I created a .DEF file, which is below, that I wanted the linker = to =3D > > use. How=3D20 > > could be this possible?</DIV> > > <DIV>Does anyone have a simple DLL made with Dev-C++, in C =3D > > language?</DIV> > > <DIV> </DIV> > > <DIV>Thanks in advance,</DIV> > > <DIV> </DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2>Rodrigo = Hjort<BR><A=3D20 > > = href=3D3D"mailto:rod...@ac...">rodrigo.hjort@actumplus.= co=3D > > m.br</A></FONT></DIV> > > <DIV> </DIV></FONT></DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2></FONT> </DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2>**** C source code =3D > > *****<BR>#include=3D20 > > <windows.h></FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2>int WINAPI _export = TimesTwo(int =3D > > x);<BR>/*=3D20 > > int extern TimesTwo(int x); */ /*also tried this*/</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2>BOOL WINAPI =3D > > DllEntryPoint(HINSTANCE=3D20 > > hinstDLL, </FONT></DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2> = DWORD =3D > > fdwReason, LPVOID=3D20 > > lpvReserved)<BR>{<BR> switch =3D > > (fdwReason)<BR> =3D20 > > {<BR> case = DLL_PROCESS_ATTACH:=3D20 > > break;<BR> case = DLL_THREAD_ATTACH:=3D20 > > break;<BR> case = DLL_PROCESS_DETACH: =3D > >=20 > > break;<BR> case = DLL_THREAD_DETACH:=3D20 > > break;<BR> }<BR> return=3D20 > > TRUE;<BR>}</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2>int WINAPI _export = TimesTwo(int =3D > > x)<BR>/*int=3D20 > > extern TimesTwo(int x)*/</FONT></DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2>{<BR> = return =3D > > x *=3D20 > > 2;<BR>}<BR>*************************</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3D3D"Courier New" size=3D3D2><BR>*** DEF file=3D20 > > ******<BR>LIBRARY =3D20 > > Sample<BR>DESCRIPTION 'SAMPLE=3D20 > > DLL'<BR>CODE = =3D > > PRELOAD=3D20 > > MOVABLE=3D20 > > = DISCARDABLE<BR>DATA = =3D > > =3D20 > > PRELOAD=3D20 > > = SINGLE<BR>EXPORTS<BR> &nbs= =3D > > p; =3D20 > > TimesTwo<BR>*******************</FONT></DIV></BODY></HTML> > >=20 > > ------=3D_NextPart_000_0070_01C1469D.78339220-- > >=20 > >=20 > >=20 > >=20 > > --__--__-- > >=20 > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >=20 > >=20 > > End of Dev-cpp-users Digest > >=20 >=20 >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Jason S. <mys...@op...> - 2001-09-26 23:29:21
|
See that nice little link on the bottom of -all- the messages? https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ?? Try going to it, it just might help you unsubscribe. ;) ----- Original Message ----- From: tayo odesanya To: dev...@li... Sent: Wednesday, September 26, 2001 7:18 PM Subject: Re: [Dev-C++] Direct X Please unsubscribe me. Thanks. tayo. _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: tayo o. <ta...@ya...> - 2001-09-26 23:18:20
|
Please unsubscribe me. Thanks. tayo. --- MetalKura <met...@wa...> wrote: > http://www.openrpgs.com/dx_tutorial/dx_2e.html > ----- Original Message ----- > From: "Ian Weston" <lak...@ho...> > To: <dev...@li...> > Sent: Wednesday, September 26, 2001 9:44 PM > Subject: [Dev-C++] Direct X > > > > hello again everyone. i was wondering if anyone > knows of any good DirectX > > sites or tutorials. > > > > thanks > > > > ian. > > > > > _________________________________________________________________ > > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp > > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com |
From: MetalKura <met...@wa...> - 2001-09-26 22:20:18
|
http://www.openrpgs.com/dx_tutorial/dx_2e.html ----- Original Message ----- From: "Ian Weston" <lak...@ho...> To: <dev...@li...> Sent: Wednesday, September 26, 2001 9:44 PM Subject: [Dev-C++] Direct X > hello again everyone. i was wondering if anyone knows of any good DirectX > sites or tutorials. > > thanks > > ian. > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Urmila S. <ums...@cc...> - 2001-09-26 22:03:13
|
Hi, My name is Urmila. I want to know if in C++ there is a built in function that will calculate the running time of an algorithm, and if so how do you use it? Urmila On Wed, 26 Sep 2001 dev...@li... wrote: > Send Dev-cpp-users mailing list submissions to > dev...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > or, via email, send a message with subject or body 'help' to > dev...@li... > > You can reach the person managing the list at > dev...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Dev-cpp-users digest..." > > > Today's Topics: > > 1. RE: C++ standard - Nesting classes. (Ioannis Vranos) > 2. RE: C++ standard - Nesting classes. (Ioannis Vranos) > 3. Building DLLs (Rodrigo Hjort) > > --__--__-- > > Message: 1 > From: "Ioannis Vranos" <no...@ya...> > To: <dev...@li...> > Subject: RE: [Dev-C++] C++ standard - Nesting classes. > Date: Wed, 26 Sep 2001 20:33:01 +0200 > Reply-To: dev...@li... > > Win32 API is old, MFC is old. .NET will have a different system call > class hierarchy called BCL (Base Class Library). So why learn legacy > stuff? > > For now, if you can't wait for .NET i suggest you Borland C++ Builder > and its class hierarchy called VCL (Visual Class Library). It is a lot > higher level than MFC/Win32 crap. For accuracy it is a very high level > Win32 wrapper. It covers anything and you will probably never need to > write win32 crap. Also, Borland RAD/VCL is more high level than the > RAD/BCL which will come with Visual Studio 7 and .NET in general. > Dev-C++ does not cover of course VCL, but i am telling you the best > solution for Windows programming (the best thing for you) for now. The > book "C++ Builder 5 Developer's Guide" by Sams Publishing comes with a > trial version of the Borland's IDE and this is also the book i suggest > you read for this particular IDE. > > As for "The C++ Programming Language" 3rd edition or special edition, > i suggest you read it all from cover to cover (although it will take > about 1-2 years). Reading for example 2-3 pages/day is a good speed, > with no much brain overhead and what you learn will not get wasted since > C++ will not change. :) > > > Ioannis > > * Ioannis Vranos > * Programming pages: http://www.noicys.f2s.com > * Alternative URL: http://run.to/noicys > > > > -----Original Message----- > > From: dev...@li...=20 > > [mailto:dev...@li...] On Behalf=20 > > Of Jason Hardman > > Sent: Wednesday, September 26, 2001 5:29 PM > > To: dev...@li... > > Subject: Re: [Dev-C++] C++ standard - Nesting classes. > >=20 > >=20 > > Perhaps I should have been a little more clearer in the=20 > > wording I used. What am doing is declaring one class which is=20 > > the primary class that provides the functionality I am coding=20 > > (a glorified state storage object in this case), and that=20 > > class has other classes declared within it. These internal=20 > > class declerations are private and so it shoudn't be possible=20 > > to instantiate an object from one of these classes from=20 > > outside the object. The Example from Ioannis Vranos=20 > > (thanks)shows this quite well. > >=20 > > class A > > { > > public: > > enum errors{MEMORY, DISK, MONITOR}; > >=20 > > private: > > class E > > { > > errors e; > >=20 > > public: > > E(errors er):e(er) {} > > }; > >=20 > > }; > >=20 > > int main() > > { > > A a; > >=20 > > A::errors e; > >=20 > > A::E x(e); // Mistake, E is private > > } > >=20 > > This compiles under Dev - C++ with MinGW, but not with=20 > > Borland C++ 5.5. > >=20 > > Declaring a class doesn't create an instance of it, but AFAIK=20 > > it should still be subject to the access specifier it was=20 > > declared under. This is probably a known issue for MinGW,=20 > > although I haven't had a chance to check that yet. > >=20 > > By the way, I already have Bjarn Stroustrup's book. I already=20 > > knew how to code in C++ before getting it so never really=20 > > read it all the way through, but I use it whenever I want=20 > > know about the best approach to a design. It has a lot of=20 > > useful information although there are easier books to use as=20 > > a reference. > >=20 > > I have very little experience of Windows programming myself,=20 > > but that something else I am trying to learn at this point.=20 > > Any suggestions by anyone as to a good Windows API book would=20 > > be appreciated by the way. Whenever I find a Windows book it=20 > > is primarily about using MFC to write windows programs, but I=20 > > don't have access to MFC at the moment so it's pretty useless to me. > >=20 > > Thanks all, Jason. > >=20 > > PS: sorry about blathering on and on, I do that alot. :-D > >=20 > > ----- Original Message ----- > > From: "Michael Codadeen" <jd...@ho...> > > To: <dev...@li...> > > Sent: Wednesday, September 26, 2001 8:39 AM > > Subject: Re: [Dev-C++] C++ standard - Nesting classes. > >=20 > >=20 > > > Hi Jason, > > > > > > The standard states that anything in your private area is only=20 > > > accessable > > by > > > that class. Not even public derived classes of that class=20 > > can access=20 > > > it. > > > > > > The protected area is accessable by public derived classes of that=20 > > > class. > > In > > > effect it becomes the private area of that derived class. Also,=20 > > > classes of the same type that get passed into an object as=20 > > an argument=20 > > > may have their protected area accessed. > > > > > > i.e. > > > > > > Class A { > > > public: > > > inline mthd(Class A& obj){cout << obj.data << endl;}; > > > protected: > > > data; > > > } > > > > > > Class A a, b; > > > a.mthd(b); << object a can access b protected area. > > > > > > The public area of a class can be accessed by anyone. > > > > > > The story is slightly different for protected and private derived=20 > > > classes. For more info get Stroustrups book. > > > > > > http://www.research.att.com/~bs/ > > > > > > I would not usually have a class called main, I would=20 > > normally have a > > public > > > static main() function and tell my compiler which class contains=20 > > > main(). However, I guess this changes when you are Windows=20 > > programming=20 > > > of which I have no experience. > > > > > > Could you send an example of what you are doing so we could=20 > > help some > > more. > > > > > > Thanks, > > > > > > Michael > > > > > > >From: "Jason Hardman" <jas...@bt...> > > > >Reply-To: dev...@li... > > > >To: "Dev-C++" <dev...@li...> > > > >Subject: [Dev-C++] C++ standard - Nesting classes. > > > >Date: Wed, 26 Sep 2001 03:03:24 +0100 > > > > > > > >Hi, > > > > > > > >In a project I have been working on I have nested some=20 > > classes within=20 > > > >a main class that provides an overall functionality. I=20 > > wanted to make=20 > > > >these internal classes inaccessible to anyone using the=20 > > main class. I=20 > > > >had hoped that putting them in a private or protected area of the=20 > > > >main class it > > would > > > >stop outside access, but this doesn't seem to work in Dev-C++=20 > > > >(MinGW). > > Does > > > >anyone know if that is standard C++ behaviour? None of my=20 > > C++ books=20 > > > >say anything about access specifiers and nested classes,=20 > > and they say=20 > > > >pretty little about nested classes full-stop. It could=20 > > reasonally be=20 > > > >that only data and methods are affected by access specifiers, but=20 > > > >it's hard for me to be sure. > > > > > > > >I am now looking for an alternative way of hiding those classes,=20 > > > >although > > I > > > >have found some interesting options in using an implementation=20 > > > >namespace, > > I > > > >am still interesting in hearing any other ideas? > > > > > > > >Thanx, Jason. > > > > > > > > > > > >_______________________________________________ > > > >Dev-cpp-users mailing list Dev...@li... > > > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > > _________________________________________________________________ > > > Get your FREE download of MSN Explorer at=20 > > > http://explorer.msn.com/intl.asp > > > > > > > > > _______________________________________________ > > > Dev-cpp-users mailing list Dev...@li... > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >=20 > >=20 > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >=20 > > > > --__--__-- > > Message: 2 > From: "Ioannis Vranos" <no...@ya...> > To: <dev...@li...> > Subject: RE: [Dev-C++] C++ standard - Nesting classes. > Date: Wed, 26 Sep 2001 20:34:30 +0200 > Reply-To: dev...@li... > > Stroustrup has a link at his pages for a pdf of a very recent draft for > the standard. > > > Ioannis > > * Ioannis Vranos > * Programming pages: http://www.noicys.f2s.com > * Alternative URL: http://run.to/noicys > > > > -----Original Message----- > > From: dev...@li...=20 > > [mailto:dev...@li...] On Behalf=20 > > Of Jason Hardman > > Sent: Wednesday, September 26, 2001 4:56 PM > > To: dev...@li... > > Subject: Re: [Dev-C++] C++ standard - Nesting classes. > >=20 > >=20 > > Thanks for that. I don't currently have any other compilers=20 > > on my system so hadn't thought to check. I know that the=20 > > Borland Compiler is probably the most standard compliant=20 > > compiler available, so the fact that it didn't work on it=20 > > probably meens it is standard. > >=20 > > I guess I'll have to inquire of the MinGW development=20 > > community to see about them adding compliance. Thinking of=20 > > all this I remember hearing about a website that contains a=20 > > copy of the C++ standard, does anyone know where it it? I=20 > > will be searching for it, but it would be easier if somebody=20 > > already knows about it. > >=20 > > Thanks, Jason. > >=20 > > ----- Original Message ----- > > From: "Ioannis Vranos" <no...@ya...> > > To: <dev...@li...> > > Sent: Wednesday, September 26, 2001 1:11 PM > > Subject: RE: [Dev-C++] C++ standard - Nesting classes. > >=20 > >=20 > > You are right. The following code compiles in Dev-C++: > >=20 > > class A > > { > > public: > > enum errors{ MEMORY, DISK, MONITOR}; > >=20 > > private: > > class E > > { > > errors e; > >=20 > > public: > > E(errors er):e(er) {} > > }; > >=20 > > }; > >=20 > > int main() > > { > > A a; > >=20 > > A::errors e; > >=20 > > A::E x(e); // Mistake, E is private > > } > >=20 > >=20 > > This shouldn't compile, so i consider it a compiler defect.=20 > > Borland C++ 5.5 gives the (expected) error: > >=20 > > Error E2247 temp.cpp 23: 'A::E' is not accessible in function main() > > *** 1 errors in Compile *** > >=20 > >=20 > > Ioannis > >=20 > > * Ioannis Vranos > > * Programming pages: http://www.noicys.f2s.com > > * Alternative URL: http://run.to/noicys > >=20 > >=20 > >=20 > > > -----Original Message----- > > > From: dev...@li... > > > [mailto:dev...@li...] On=20 > > Behalf Of Jason=20 > > > Hardman > > > Sent: Wednesday, September 26, 2001 4:03 AM > > > To: Dev-C++ > > > Subject: [Dev-C++] C++ standard - Nesting classes. > > > > > > > > > Hi, > > > > > > In a project I have been working on I have nested some=20 > > classes within=20 > > > a main class that provides an overall functionality. I=20 > > wanted to make=20 > > > these internal classes inaccessible to anyone using the=20 > > main class. I=20 > > > had hoped that putting them in a private or protected area=20 > > of the main=20 > > > class it would stop outside access, but this doesn't seem to work > > > in Dev-C++ (MinGW). Does anyone know if that is standard C++ > > > behaviour? None of my C++ books say anything about access > > > specifiers and nested classes, and they say pretty little > > > about nested classes full-stop. It could reasonally be that > > > only data and methods are affected by access specifiers, but > > > it's hard for me to be sure. > > > > > > I am now looking for an alternative way of hiding those classes,=20 > > > although I have found some interesting options in using an=20 > > > implementation namespace, I am still interesting in hearing=20 > > any other=20 > > > ideas? > > > > > > Thanx, Jason. > > > > > > > > > _______________________________________________ > > > Dev-cpp-users mailing list Dev...@li... > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > >=20 > >=20 > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >=20 > >=20 > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >=20 > > > > --__--__-- > > Message: 3 > From: "Rodrigo Hjort" <rod...@ac...> > To: "Dev-C++ Users List" <dev...@li...> > Date: Wed, 26 Sep 2001 15:11:08 -0300 > Subject: [Dev-C++] Building DLLs > Reply-To: dev...@li... > > This is a multi-part message in MIME format. > > ------=_NextPart_000_0070_01C1469D.78339220 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Dear Dev-C++ users, > > I'm trying to build a DLL to use with other applications made in Delphi = > and VB. > The code below is a very simple DLL I tried to make using Dev-C++. > > It compiles perfectly and creates the DLL file. > But appears the warning: "no export definition file provided; dllwrap = > will create one, but may not be what you want". > I noticed that it uses the file "dll.def" and modifies the name of the = > function in the DLL to "TimesTwo__Fi". > > I created a .DEF file, which is below, that I wanted the linker to use. = > How could be this possible? > Does anyone have a simple DLL made with Dev-C++, in C language? > > Thanks in advance, > > Rodrigo Hjort > rod...@ac... > > > **** C source code ***** > #include <windows.h> > > int WINAPI _export TimesTwo(int x); > /* int extern TimesTwo(int x); */ /*also tried this*/ > > BOOL WINAPI DllEntryPoint(HINSTANCE hinstDLL,=20 > DWORD fdwReason, LPVOID lpvReserved) > { > switch (fdwReason) > { > case DLL_PROCESS_ATTACH: break; > case DLL_THREAD_ATTACH: break; > case DLL_PROCESS_DETACH: break; > case DLL_THREAD_DETACH: break; > } > return TRUE; > } > > int WINAPI _export TimesTwo(int x) > /*int extern TimesTwo(int x)*/ > { > return x * 2; > } > ************************* > > > *** DEF file ****** > LIBRARY Sample > DESCRIPTION 'SAMPLE DLL' > CODE PRELOAD MOVABLE DISCARDABLE > DATA PRELOAD SINGLE > EXPORTS > TimesTwo > ******************* > > ------=_NextPart_000_0070_01C1469D.78339220 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META content=3D"text/html; charset=3Diso-8859-1" = > http-equiv=3DContent-Type> > <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY bgColor=3D#ffffff> > <DIV><FONT face=3D"Courier New" size=3D2> > <DIV>Dear Dev-C++ users,</DIV> > <DIV> </DIV> > <DIV>I'm trying to build a DLL to use with other applications made in = > Delphi and=20 > VB.</DIV> > <DIV>The code below is a very simple DLL I tried to make using = > Dev-C++.</DIV> > <DIV> </DIV> > <DIV>It compiles perfectly and creates the DLL file.</DIV> > <DIV>But appears the warning: "no export definition file provided; = > dllwrap will=20 > create one, but may not be what you want".</DIV> > <DIV>I noticed that it uses the file "dll.def" and modifies the name of = > the=20 > function in the DLL to "TimesTwo__Fi".</DIV> > <DIV> </DIV> > <DIV>I created a .DEF file, which is below, that I wanted the linker to = > use. How=20 > could be this possible?</DIV> > <DIV>Does anyone have a simple DLL made with Dev-C++, in C = > language?</DIV> > <DIV> </DIV> > <DIV>Thanks in advance,</DIV> > <DIV> </DIV> > <DIV><FONT face=3D"Courier New" size=3D2>Rodrigo Hjort<BR><A=20 > href=3D"mailto:rod...@ac...">rod...@ac...= > m.br</A></FONT></DIV> > <DIV> </DIV></FONT></DIV> > <DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV> > <DIV><FONT face=3D"Courier New" size=3D2>**** C source code = > *****<BR>#include=20 > <windows.h></FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3D"Courier New" size=3D2>int WINAPI _export TimesTwo(int = > x);<BR>/*=20 > int extern TimesTwo(int x); */ /*also tried this*/</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3D"Courier New" size=3D2>BOOL WINAPI = > DllEntryPoint(HINSTANCE=20 > hinstDLL, </FONT></DIV> > <DIV><FONT face=3D"Courier New" size=3D2> DWORD = > fdwReason, LPVOID=20 > lpvReserved)<BR>{<BR> switch = > (fdwReason)<BR> =20 > {<BR> case DLL_PROCESS_ATTACH:=20 > break;<BR> case DLL_THREAD_ATTACH:=20 > break;<BR> case DLL_PROCESS_DETACH: = > > break;<BR> case DLL_THREAD_DETACH:=20 > break;<BR> }<BR> return=20 > TRUE;<BR>}</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3D"Courier New" size=3D2>int WINAPI _export TimesTwo(int = > x)<BR>/*int=20 > extern TimesTwo(int x)*/</FONT></DIV> > <DIV><FONT face=3D"Courier New" size=3D2>{<BR> return = > x *=20 > 2;<BR>}<BR>*************************</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3D"Courier New" size=3D2><BR>*** DEF file=20 > ******<BR>LIBRARY =20 > Sample<BR>DESCRIPTION 'SAMPLE=20 > DLL'<BR>CODE = > PRELOAD=20 > MOVABLE=20 > DISCARDABLE<BR>DATA = > =20 > PRELOAD=20 > SINGLE<BR>EXPORTS<BR> &nbs= > p; =20 > TimesTwo<BR>*******************</FONT></DIV></BODY></HTML> > > ------=_NextPart_000_0070_01C1469D.78339220-- > > > > > --__--__-- > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > End of Dev-cpp-users Digest > |
From: St0fF 6. <st...@gm...> - 2001-09-26 21:35:29
|
Sorry! Why don't you try OpenGL? It's better because few modifications = can make the code portable to other systems. There you should start = with NeHe's tutorials: http://nehe.gamedev.net or visit Nate @ =20 http://nate.scuzzy.net/gltut/. Also look for GLUT if you like this = idea of portability! Cheers, St0fF. =20 ----- Original Message -----=20 From: "Ian Weston" <lak...@ho...> To: <dev...@li...> Sent: Wednesday, September 26, 2001 9:44 PM Subject: [Dev-C++] Direct X | hello again everyone. i was wondering if anyone knows of any good = DirectX=20 | sites or tutorials. |=20 | thanks |=20 | ian. |=20 | _________________________________________________________________ | Get your FREE download of MSN Explorer at = http://explorer.msn.com/intl.asp |=20 |=20 | _______________________________________________ | Dev-cpp-users mailing list | Dev...@li... | https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Ian W. <lak...@ho...> - 2001-09-26 19:44:40
|
hello again everyone. i was wondering if anyone knows of any good DirectX sites or tutorials. thanks ian. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Rodrigo H. <rod...@ac...> - 2001-09-26 18:08:11
|
Dear Dev-C++ users, I'm trying to build a DLL to use with other applications made in Delphi = and VB. The code below is a very simple DLL I tried to make using Dev-C++. It compiles perfectly and creates the DLL file. But appears the warning: "no export definition file provided; dllwrap = will create one, but may not be what you want". I noticed that it uses the file "dll.def" and modifies the name of the = function in the DLL to "TimesTwo__Fi". I created a .DEF file, which is below, that I wanted the linker to use. = How could be this possible? Does anyone have a simple DLL made with Dev-C++, in C language? Thanks in advance, Rodrigo Hjort rod...@ac... **** C source code ***** #include <windows.h> int WINAPI _export TimesTwo(int x); /* int extern TimesTwo(int x); */ /*also tried this*/ BOOL WINAPI DllEntryPoint(HINSTANCE hinstDLL,=20 DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: break; case DLL_THREAD_ATTACH: break; case DLL_PROCESS_DETACH: break; case DLL_THREAD_DETACH: break; } return TRUE; } int WINAPI _export TimesTwo(int x) /*int extern TimesTwo(int x)*/ { return x * 2; } ************************* *** DEF file ****** LIBRARY Sample DESCRIPTION 'SAMPLE DLL' CODE PRELOAD MOVABLE DISCARDABLE DATA PRELOAD SINGLE EXPORTS TimesTwo ******************* |