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
(9) |
2
(5) |
3
(7) |
4
(1) |
5
(1) |
6
(4) |
7
(8) |
8
(7) |
9
(10) |
10
(1) |
11
(7) |
12
(6) |
13
(6) |
14
(2) |
15
(8) |
16
(3) |
17
(2) |
18
(6) |
19
(6) |
20
|
21
(14) |
22
(5) |
23
|
24
(5) |
25
(5) |
26
(3) |
27
(12) |
28
(4) |
29
(4) |
30
(7) |
|
|
From: <adm...@yd...> - 2004-09-26 06:30:58
|
McAfee GroupShield=C2=99 Alert=20 McAfee GroupShield discovered a problem with the following email. See your system administrator for further information.=20 Date/Time sent: 26 sep 2004 08:30:43 Subject line: [Dev-C++] failure notice From: dev...@li... To: dev...@li... Action taken: Deleted Virus: W32/Bagle.ai@MM Copyright =C2=A9 1993-2003, Networks Associates Technology, Inc. All Rights Reserved. http://www.mcafeesecurity.com <http://www.mcafeesecurity.com/> =20 -------------------------------------------------------------------------= ------------- This message and any files transmitted with it are confidential and inten= ded solely=20 for the use of the individual or entity to whom they are addressed. No co= nfidentiality=20 or privilege is waived or lost by any wrong transmission.=20 If you have received this message in error, please immediately destroy it= =20and kindly=20 notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any=20 part of this message if you are not the intended recipient. Opinions, con= clusions and=20 other information in this message that do not relate to the official busi= ness of=20 Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given= =20nor endorsed by it.=20 -------------------------------------------------------------------------= ------------- |
From: Scott S. <ssi...@sp...> - 2004-09-25 16:49:19
|
Go tou sourceforge.net, search for dev-c++, and click the feature request link. This mailing froup isn't the place. Martin Olsson wrote: > Hi, > > I have three feature requests for Dev-CPP, one is a little bit of work > to implement (first one) the two other is very easy to implement but > extremely useful. Comments on these features are welcome. > > 1. A "Web Tools" that provides an "Publish project as HTML" option. > This command should use FTP or SCP to connect to a file-server and > upload HTML files to this server containing the syntax highlighted > code of the current project. This option would be very helpful when > you're working on open-source projects (source is no secret anyway) > and you need to ask for help about something. I've used services such > as www.rafb.net/paste quite often but it takes time and often the bugs > are in another file, or the guy who is helping out needs to look at > some other file. Using this command I publish all of it at once and > then they helping guy could broswe around as he whishes. > > 2. VERY VERY SIMPLE. An option in the project menu that counts the > number of lines in all project files (.h and .cpp/.c). > > 3. VERY SIMPLE. A would like a new option in the File/New menu, it > should be called new "Source Pair" or something like that. When > clicked a dialog should appear asking for a name, if I enter MyName > here it should create myname.h and myname.cpp (if IDE is in C++ mode) > otherwise myname.h and myname.c (if IDE is in C mode). In the .c/.cpp > file it should already say #include "myname.h" and in the .h file it > should have written out the usual macro hack everybody uses, ie: > > #ifndef MYNAME_HEADER_INCLUDED > #define MYNAME_HEADER_INCLUDED > //code goes here > #endif /* MYNAME_HEADER_INCLUDED */ > > Going even futher one could implement something similar to Eclipse's > option "New Class", and if the user types "MyClass" in the dialog then > Dev-cpp creates both a .h file with the above macro-hack and also a > declaration "class MyClass" etc etc. > > --- > > Even though the syntax-completion engine is abit buggy at times, > Dev-CPP is a great tool and I really enjoy using it! Keep up the good > work!! > > > > regards, > martin olsson > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > 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: Scott S. <age...@co...> - 2004-09-25 12:52:19
|
Did you download the compiler with the IDE, or just the IDE? IF you downloaded the IDE only, you have no compiler, and that would be a problem right there, --Scott Simontis-- Weili Yao wrote: > Hello, All: > I just downloaded Dev-C++ 4.9.9.0 and installed in my Dell PC with > Microsoft Windows XP Professional Version 2002 Service Pack 1. When I > tried to compile any file (even just Hello.dev), in "Compile Log", it > says like this: > > Compiler: Default compiler > Building Makefile: "C:\Dev-Cpp\Examples\Hello\Makefile.win" > Executing make... > c:\dev-cpp\make.exe -f "C:\Dev-Cpp\Examples\Hello\Makefile.win" all > Execution terminated > and in "Compiler" window, it says: > 2 C:\Dev-Cpp\Examples\Hello\2 unable to run program file. > > Does anybody know why I am not able to run program file? > > Thanks a lot! > > Weili Yao > |
From: Martin O. <li...@mi...> - 2004-09-25 09:46:25
|
Hi, I have three feature requests for Dev-CPP, one is a little bit of work to implement (first one) the two other is very easy to implement but extremely useful. Comments on these features are welcome. 1. A "Web Tools" that provides an "Publish project as HTML" option. This command should use FTP or SCP to connect to a file-server and upload HTML files to this server containing the syntax highlighted code of the current project. This option would be very helpful when you're working on open-source projects (source is no secret anyway) and you need to ask for help about something. I've used services such as www.rafb.net/paste quite often but it takes time and often the bugs are in another file, or the guy who is helping out needs to look at some other file. Using this command I publish all of it at once and then they helping guy could broswe around as he whishes. 2. VERY VERY SIMPLE. An option in the project menu that counts the number of lines in all project files (.h and .cpp/.c). 3. VERY SIMPLE. A would like a new option in the File/New menu, it should be called new "Source Pair" or something like that. When clicked a dialog should appear asking for a name, if I enter MyName here it should create myname.h and myname.cpp (if IDE is in C++ mode) otherwise myname.h and myname.c (if IDE is in C mode). In the .c/.cpp file it should already say #include "myname.h" and in the .h file it should have written out the usual macro hack everybody uses, ie: #ifndef MYNAME_HEADER_INCLUDED #define MYNAME_HEADER_INCLUDED //code goes here #endif /* MYNAME_HEADER_INCLUDED */ Going even futher one could implement something similar to Eclipse's option "New Class", and if the user types "MyClass" in the dialog then Dev-cpp creates both a .h file with the above macro-hack and also a declaration "class MyClass" etc etc. --- Even though the syntax-completion engine is abit buggy at times, Dev-CPP is a great tool and I really enjoy using it! Keep up the good work!! regards, martin olsson |
From: <and...@su...> - 2004-09-24 19:05:05
|
Dear users, What is the equivalent of libc.lib and libcmt.lib for mingw? What is the -lxxx sintax that can I use to include them? Regards Andre |
From: <or...@vp...> - 2004-09-24 18:32:56
|
OROSZI Bal=E1zs wrote: > I have a question regarding window procedures. > I have a normal windows application, which at some point displays a=20 > modeless dialog box. That is, I have to press OK or CANCEL to return to= =20 > my app, and the execution of the code is "supposedly" blocked. BUT: If = I=20 > move around the dialog box, I can clearly see, that the window=20 > underneath (my main window) is actually getting paint messages, that is= ,=20 > it's window procedure is called. > Now, my question is: while my dialog box is displayed, does windows=20 > automatically create a new thread for calling the window procedure, or=20 > is it called from the same thread, as the dialog box's? But then how? A= s=20 > the code is supposedly blocked, until I close the dialog. It seems I have found the answer for this, so I'll just reply to myself i= n case anyone's=20 browsing this in the archives. The MS docs say, that there are certain messages (or situations), when th= e window=20 procedure is called directly, bypassing the message loop. It is described= in the "Messages=20 and Message Queues" section (under "Nonqueued Messages" title) of the win= 32 API docs, so=20 look there for details. -- Greetings, Bal=E1zs |
From: Scott S. <age...@co...> - 2004-09-24 10:56:41
|
#include <iostream> #include <cstdlib> using namespace std; int main() { srand(GetTickCount()); int random = rand(); cout << "Your number is: " << random; system("PAUSE"); return 0; } --Scott Simontis-- Michal Molhanec wrote: > Dmitry Sidorov wrote: > >> Hello, dev-cpp-users. >> >> How could I create random number in dev-cpp? I cannot find random() nor >> srandomdev() in headers > > > rand(), srand() > > buy some C reference :-) > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > 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: Michal M. <mi...@mo...> - 2004-09-24 09:45:48
|
Dmitry Sidorov wrote: > Hello, dev-cpp-users. > > How could I create random number in dev-cpp? I cannot find random() nor > srandomdev() in headers rand(), srand() buy some C reference :-) |
From: Dmitry S. <si...@si...> - 2004-09-24 09:19:21
|
Hello, dev-cpp-users. How could I create random number in dev-cpp? I cannot find random() nor srandomdev() in headers Dmitry |
From: <or...@vp...> - 2004-09-22 17:12:46
|
Hi! I have a question regarding window procedures. I have a normal windows application, which at some point displays a model= ess dialog box.=20 That is, I have to press OK or CANCEL to return to my app, and the execut= ion of the code=20 is "supposedly" blocked. BUT: If I move around the dialog box, I can clea= rly see, that the=20 window underneath (my main window) is actually getting paint messages, th= at is, it's=20 window procedure is called. Now, my question is: while my dialog box is displayed, does windows autom= atically create a=20 new thread for calling the window procedure, or is it called from the sam= e thread, as the=20 dialog box's? But then how? As the code is supposedly blocked, until I cl= ose the dialog. I really need some answer for this, as I searched for hours, still I have= n't found an answer. Thank you in advance. -- Greetings, Bal=E1zs |
From: <or...@vp...> - 2004-09-22 16:07:28
|
OROSZI Bal=E1zs wrote: > Added to this: > Note that Windows can move the entire contents of a window, and you onl= y=20 > need to repaint the "invalid" rectangle (a small portion) of your=20 > window, giving you great speedups (and to avoid flicker). Though you=20 > have to calculate that rectangle yourself. Process the scrollbar=20 > messages, and retrieve the amount that was scrolled, then use the=20 > ScrollWindowEx() function to move the contents of your window (your=20 > lines, etc.), then repaint the invalid rectangle (using BitBlt if you=20 > painted to a bitmap, or any other method). The invalid rectangle is wha= t=20 > you scrolled into view. A little correction: After you got the amount to the scroll, call ScrollWindowEx() with the SW= _INVALIDATE flag=20 then call UpdateWindow(). In your WM_PAINT message processor, use the PAINTSTRUCT's rcPaint rect, t= hat holds the=20 invalid rect. This way you don't need to calculate the rectangle yourself. If you're stuck, look here for a complete example: http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/shellc= c/platform/commctls/scrollbars/usingscrollbars.asp -- Greetings, Bal=E1zs |
From: <or...@vp...> - 2004-09-22 11:16:40
|
Per Westermark wrote: > This is how graphics works in most graphical environments, i.e. it is u= p > to the application to keep track of what is drawn and to repaint the > window on request. >=20 > Paint to a bitmap and redraw the bitmap suitably scrolled whenever the > window gets a repaint command. Or work with vector graphics, i.e. keep = a > list of all draw commands needed to redraw the graphics and then walk > through the list and repaint all lines, circles, characters. Added to this: Note that Windows can move the entire contents of a window, and you only = need to repaint=20 the "invalid" rectangle (a small portion) of your window, giving you grea= t speedups (and=20 to avoid flicker). Though you have to calculate that rectangle yourself. = Process the=20 scrollbar messages, and retrieve the amount that was scrolled, then use t= he=20 ScrollWindowEx() function to move the contents of your window (your lines= , etc.), then=20 repaint the invalid rectangle (using BitBlt if you painted to a bitmap, o= r any other=20 method). The invalid rectangle is what you scrolled into view. The functions you should take a look at at the windows docs: ScrollWindowEx() BitBlt() StretchBlt() // for zooming, maybe later And of course "Bitmaps" in general. The windows GDI functions will be more than sufficient for most drawings,= and I assume it=20 will be enough for you too (no need for additional libraries). -- Greetings, Bal=E1zs |
From: Per W. <pw...@ia...> - 2004-09-22 06:05:49
|
This is how graphics works in most graphical environments, i.e. it is up to the application to keep track of what is drawn and to repaint the window on request. Paint to a bitmap and redraw the bitmap suitably scrolled whenever the window gets a repaint command. Or work with vector graphics, i.e. keep a list of all draw commands needed to redraw the graphics and then walk through the list and repaint all lines, circles, characters. There are some libraries - or sample code - that performs the above operations. Select a graphics library of your choice and check through the example programs. /Per W On 22 Sep 2004, santhosh shenoy p wrote: > Hi , > I'm Santhosh an engineering student. Right now I'm doing a project on graphics using devc++ 4.8 . I have a problem. > The problem is that once I draw line or a text on the window and scroll the vertical scroll bars the lines that I had drawn would get erased. > kindly suggest me way so that any graphics I put on the screen at runtime and then even after scrolling the scroll bars the graphics thus scrolled should not get erased after unscrolling later. > > Eagerly waiting for your kind and a positive response. > Santhosh. > |
From: santhosh s. p <psa...@re...> - 2004-09-22 04:40:21
|
Hi ,=0A I'm Santhosh an engineering student. Right now I'm doing a proj= ect on graphics using devc++ 4.8 . I have a problem.=0AThe problem is that = once I draw line or a text on the window and scroll the vertical scroll ba= rs the lines that I had drawn would get erased.=0Akindly suggest me way so= that any graphics I put on the screen at runtime and then even after scrol= ling the scroll bars the graphics thus scrolled should not get erased after= unscrolling later.=0A=0AEagerly waiting for your kind and a positive resp= onse.=0ASanthosh.=0A |
From: Scott S. <age...@co...> - 2004-09-21 22:06:37
|
Thanks everyone for all your advice. Throughout my free time, I will begin work on the library now. --Scott Simontis-- Per Westermark wrote: >For documentation, I would recomend doxygen. It is a nice application that >will scan through specially formatted comments - similar to JavaDoc etc - >and build HTML, Latex, ... documentation. > >/Per W > >On Tue, 21 Sep 2004, ZwiQ wrote: > > > >>I did not look for a satisfying >>documentationparser by myself yet, but I think there must be some good >>applications around which can parse extern documentation from your >>comments like JavaDoc does vor Java. >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 >Project Admins to receive an Apple iPod Mini FREE for your judgement on >who ports your project to Linux PPC the best. Sponsored by IBM. >Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > |
From: Per W. <pw...@ia...> - 2004-09-21 20:53:23
|
For documentation, I would recomend doxygen. It is a nice application that will scan through specially formatted comments - similar to JavaDoc etc - and build HTML, Latex, ... documentation. /Per W On Tue, 21 Sep 2004, ZwiQ wrote: > I did not look for a satisfying > documentationparser by myself yet, but I think there must be some good > applications around which can parse extern documentation from your > comments like JavaDoc does vor Java. |
From: Per W. <pw...@ia...> - 2004-09-21 20:49:30
|
Ouch. Besides the misspelled include, the coding style of the example is a bit ancient. Not specifying a return type for main, i.e. defaulting to int. Not specifying any parameter prototypes either, just empty parentheses wich is something completely different from empty parentheses in C++ where it would have been a short form for main(void) but in C represents something like main(...) i.e. whatever. /Per W On Tue, 21 Sep 2004, Daniel K. O. wrote: > Per Westermark wrote: > > >However, I saw two main() but a single #include of a non-existing header > >file. I wanted to make sure that is was just an imcomplete cut-and-paste > >of two separate programs. > > > > OMG, this *IS* in the Dev-Cpp's Help file!!!!! o.O > Go to "An introdutcion to C Programming" -> "Topics" -> "Your First > Program" if you don't believe. > Please someone slap who wrote this chapter. Two times. > > Daniel K. O. |
From: ZwiQ <zw...@he...> - 2004-09-21 20:14:19
|
> 1. Can I span the class definition across multiple files, or must I > stich to the decleration in one .h file and the definition in a .cpp > file? Yes you can. I personally prefer to declare one single class (and in rare cases some friends) in a header file and define their functions one function per sourcefile, eg.: // a.h Class A { A(); ~A(); MemberOfA(unsigned arg); } // a.cpp A::A() { /* source code */ } // ~a.cpp A::~A() {/* source code */} // memberofa.cpp A::MemberOfA(unsigned arg) {/* source code */} > 2. I have heard some people say you should only define one function > per .cpp file in a library due to size issues. Is this true, and if > so, is it worth the added effort? I'm not sure but I can imagine that the linker will only link objectfiles the developer using your class actually uses. In that case its no only far more clear to use seperate files for each memberfunction but also more efficient. It probably doesn't matter when you publish your wrapperclass as a single library though? > 3. What is the level of documentation required for a basic wrapper > class? I stick to a header at the top of each file, function headers, > and in code comments. Will it be necessary to include any external > documentation at this point? A header for each file is ok in case of one function per file :o). I suggest a short description of parameters and use of the defined member. When a project grows larger and larger you may forget what the purpose of certain functions and their use exactly was. Function headers will prevent you from that. I did not look for a satisfying documentationparser by myself yet, but I think there must be some good applications around which can parse extern documentation from your comments like JavaDoc does vor Java. Latter two questions are better answered by someone with some more experience. I'll only give my personal considerations. > 4. Should I just use several functions in a namespace instead of a > class to simplify the development process? I suggest using classes mainly for things you can (intuitive) describe in terms of objects. General functions, nothing to do with certain objects (probably rare in the context of a OpenGL wrapper class) are maybe on a better place in a librarynamespace. But hey, I never did these kind of big projects in C++, maybe someone with more experience? :o). > 5. Are there any long term pros/cons associated with maintanence of a > class versus functions in a namespace? Interesting question. I don't know. I can imagine however that there are. Anyone? Regards, Hielke |
From: Daniel K. O. <dan...@ya...> - 2004-09-21 19:44:10
|
Per Westermark wrote: >However, I saw two main() but a single #include of a non-existing header >file. I wanted to make sure that is was just an imcomplete cut-and-paste >of two separate programs. > OMG, this *IS* in the Dev-Cpp's Help file!!!!! o.O Go to "An introdutcion to C Programming" -> "Topics" -> "Your First Program" if you don't believe. Please someone slap who wrote this chapter. Two times. Daniel K. O. |
From: Per W. <pw...@ia...> - 2004-09-21 15:54:25
|
I didn't care about this/these. However, I saw two main() but a single #include of a non-existing header file. I wanted to make sure that is was just an imcomplete cut-and-paste of two separate programs. When helping someone, it is often useful to _really_ make sure :) /Per W On Tue, 21 Sep 2004, OROSZI Bal=E1zs wrote: > Per Westermark wrote: > > First of all, I don't understand why you show two main() functions. > > Because he said he tried these programs, but he mistakenly written "this = programs". > You should be more forgiving for language mistakes :) > > -- > Bal=E1zs > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > 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: <or...@vp...> - 2004-09-21 15:23:24
|
Per Westermark wrote: > First of all, I don't understand why you show two main() functions. Because he said he tried these programs, but he mistakenly written "this = programs". You should be more forgiving for language mistakes :) -- Bal=E1zs |
From: Danny S. <Dan...@tr...> - 2004-09-21 10:30:38
|
Replace =20 #include <stdin.h> =20 with =20 #include <stdio.h> =20 and try again. =20 To everybody else: Does a stdin.h system header really exist or is this just a typo? I've never seen this include file referenced before. =20 Danny =20 =20 ________________________________ From: dev...@li... [mailto:dev...@li...] On Behalf Of hao li Sent: 21 September 2004 11:41 To: dev...@li... Subject: [Dev-C++] please help =20 I have just downloaded=20 =20 Dev-C++ 4.9.9.0 and try it for funtionality.=20 When compiling the basic C source codes it make me trouble I used create new scource file and I tried this programs here copied from the helpfile =20 #include <stdin.h> main() { printf("Hello World\n"); } =20 and =20 =20 main() /* main function heading */ { printf("\n Hello, World! \n"); /* Display message on */ } /* the screen * =20 =20 when compiling it i got the error message =20 in fuction `int main' printf undecleared =20 does anyone know whats wrong??? ________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! <http://us.rd.yahoo.com/mail_us/taglines/new/*http:/promotions.yahoo.com /new_mail>=20 |
From: Per W. <pw...@ia...> - 2004-09-21 10:22:38
|
First of all, I don't understand why you show two main() functions. Second, to define printf() you should #include <stdio.h> and _not_ <stdin.h> /Per W On Tue, 21 Sep 2004, hao li wrote: > I have just downloaded > > Dev-C++ 4.9.9.0 and try it for funtionality. > When compiling the basic C source codes it make me trouble > I used create new scource file and > I tried this programs here copied from the helpfile > > #include <stdin.h> > main() > { > printf("Hello World\n"); > } > > and > > > main() /* main function heading */ > { > printf("\n Hello, World! \n"); /* Display message on */ > } /* the screen * > > > when compiling it i got the error message > > in fuction `int main' > printf undecleared > > does anyone know whats wrong??? > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail is new and improved - Check it out! |
From: hao li <ha...@ya...> - 2004-09-21 09:40:50
|
I have just downloaded Dev-C++ 4.9.9.0 and try it for funtionality. When compiling the basic C source codes it make me trouble I used create new scource file and I tried this programs here copied from the helpfile #include <stdin.h> main() { printf("Hello World\n"); } and main() /* main function heading */ { printf("\n Hello, World! \n"); /* Display message on */ } /* the screen * when compiling it i got the error message in fuction `int main' printf undecleared does anyone know whats wrong??? --------------------------------- Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! |
From: Per W. <pw...@ia...> - 2004-09-21 09:17:52
|
When building libraries, the linker can not select individual functions/variables that are referenced by the application. It always includes complete object files from the library. Because of this, a good library is modular, with a lot of small object files to not require linking of more functions than what the application need. The same concept is true for classes. If creating really large classes, it might be an id=E9a to split the class implementation into multiple object files to allow an application to only link relevant portions. However, often it is possible to instead split the class into a hierarchy or by sending functor objects or similar as arguments to the methods. /Per W On Tue, 21 Sep 2004, Wehrli, Lior wrote: > > Hi Scott, > > > In learning OpenGL, I have decided to write my own small wrapper class > > that provides me basic funcitons like setting up a window and so forth > > to speed up the learning process. I have begun to write the wrapper > > class, but have several questions: > > Have a look at GLUT, that library offers functions for all the standart w= indow handling and interfacng stuff you normaly need. > > > 1. Can I span the class definition across multiple files, or must I > > stich to the decleration in one .h file and the definition in a .cpp f= ile? > > You can use as many .cpp files as you want, but you can not span the decl= aration of a class over several files. Consider that a class should form an= abstract entity that makes sense, i.e. all its member methods and properti= es should somehow belong together. > > > 2. I have heard some people say you should only define one function per > > .cpp file in a library due to size issues. Is this true, and if so, is > > it worth the added effort? > > I have never heard that. It doesn't matter for the compiler where a funct= ion implemented or how many functions are implemented in a single file. You= can put in a .cpp file what ever you want. The question is more: what make= s sense? Usually the one .h and one .cpp per class is the best choice. > > > 3. What is the level of documentation required for a basic wrapper > > class? I stick to a header at the top of each file, function headers, > > and in code comments. Will it be necessary to include any external > > documentation at this point? > > That is greate. I wish I could force myself to this level of documentary = discipline. If the code is for your own use only, this should be more than = enough. > > > 4. Should I just use several functions in a namespace instead of a clas= s > > to simplify the development process? > > Class vs namespace is not a question of simplification but of design logi= c. If you hav several funtions which are often used together and/or in conj= unction you should use a namespace. If you have several functions which wor= k with the same data structures you might want to wrap the functions and th= e data into a single class. > BTW: A namespace CAN (and should) be spanned over several files. > > > 5. Are there any long term pros/cons associated with maintanence of a > > class versus functions in a namespace? > > Can't think of one right now. I would use both anyway. > > Bye, > Lior > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > 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 > |