dev-cpp-users Mailing List for Dev-C++ (Page 741)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: James G. <Jam...@Cl...> - 2001-01-02 16:13:50
|
Try http://www.dinkumware.com/htm_cpl/string2.html. The STL (Standard Template Library) is a set of templates to help in the creation of containers e.g. lists, maps, queues; maths, memory management and vectors (can be used in place of char*). For example if you need a list of any type then creating a list<string> you can create a list of C++ strings which you can iterate over, sort, merge two lists, erase add to and compare etc. You can create lists of your own types which save a lot of time having to hand craft your own. Regards, James. -----Original Message----- From: Alan Thomas [mailto:ala...@3n...] Sent: Tuesday, January 02, 2001 3:41 PM To: dev...@li... Subject: [Dev-C++] regarding string manipulation (to James & Ramana & Biswa) Regarding recent string manipulation messages: James, Exactly where can I find the documentation on the std C++ string classes? Thanks, Alan From: James Gordon <Jam...@Cl...> C++ Strings have a lot of the functionality of the str... type functions built into the classes. If you need to pass a char* to a function you can use c_str() which returns a char*. Best to read the doc's. Ramana, and/or Biswa: I started out using C++ mostly like a variation of C. However, I have found that it is VERY easy to make your program hang using "char *some_string" for string manipulation --- esp. if you pass a parameter of the form "char *some_string" vice "char some_string[]". Since I am doing a lot of string manipulation, I think going with some sort of string class would be best. I, like you, have not determined the right approach yet. (I am a little less concerned with efficiency for my applications.) My question is: What is the "C++ string class" as opposed to the "STL stuff"? Thanks, Alan _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: James G. <Jam...@Cl...> - 2001-01-02 16:05:16
|
Try <http://www.dinkumware.com/htm_cpl/string2.html> http://www.dinkumware.com/htm_cpl/string2.html. Regards, James. -----Original Message----- From: Alan Thomas [mailto:ala...@3n...] Sent: Monday, January 01, 2001 4:08 PM To: dev...@li... Subject: [Dev-C++] string class documentation Where can I find documentation on what functions are provided with the std library string class? Thanks, Alan * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: James G. <Jam...@Cl...> - 2001-01-02 16:02:46
|
Try http://www.dinkumware.com/htm_cpl/fstream.html#basic_ifstream for info on ifstream take off fstream.html... to see the whole C++ Library reference. Regards, James. -----Original Message----- From: Alan Thomas [mailto:ala...@3n...] Sent: Tuesday, January 02, 2001 3:45 PM To: dev...@li... Subject: re: RE: [Dev-C++] first time error return on checking file stream validity James, Where can I find all the operations (e.g., check with "is_open") I can do on stream objects? Thanks, Alan From: James Gordon <Jam...@Cl...> The reason you are not getting an error the first time you access invalid is because when it is created the state bits are set to 'good'. After you have tried to write out the state is not 'bad'. If you were to test and return if the stream isn't open (is_open() returns true if the file pointer is not a null pointer). if (!output_file.is_open()) { cout << "Error opening file." << endl; return 1; // error indication } _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: Alan T. <ala...@3n...> - 2001-01-02 15:46:56
|
James,
Where can I find all the operations (e.g., check with
"is_open") I can do on stream objects? Thanks, Alan
From: James Gordon <Jam...@Cl...>
The reason you are not getting an error the first time you access invalid is
because when it is created the state bits are set to 'good'. After you have
tried to write out the state is not 'bad'. If you were to test and return if
the stream isn't open (is_open() returns true if the file pointer is not a
null pointer).
if (!output_file.is_open())
{
cout << "Error opening file." << endl;
return 1; // error indication
}
|
|
From: Alan T. <ala...@3n...> - 2001-01-02 15:43:32
|
Regarding recent string manipulation messages:
James,
Exactly where can I find the documentation on the std C++ string
classes? Thanks, Alan
From: James Gordon <Jam...@Cl...>
C++ Strings have a lot of the functionality of the str... type functions
built into the classes. If you need to pass a char* to a function you can
use c_str() which returns a char*. Best to read the doc's.
Ramana, and/or Biswa:
I started out using C++ mostly like a variation of C. However, I
have found that it is VERY easy to make your program hang using "char
*some_string" for string manipulation --- esp. if you pass a parameter of
the form "char *some_string" vice "char some_string[]". Since I am doing a
lot of string manipulation, I think going with some sort of string class
would be best. I, like you, have not determined the right approach yet. (I
am a little less concerned with efficiency for my applications.)
My question is: What is the "C++ string class" as opposed to the
"STL stuff"? Thanks, Alan
|
|
From: ropbert d b. <lon...@ju...> - 2001-01-02 15:22:24
|
Here are two excellent c/c++ tutorials: http://www.cs.rit.edu/~icss263/obj.vs.ref.vs.ptr/ http://www.cprogramming.com/tutorial.html Good luck and study hard lon...@ju... On Mon, 22 Jan 2001 17:07:38 +0200 "Zero-c." <zer...@ot...> writes: I study to become softwaree enginner and i learn at the moment C for the firdt semester!We learn to use pointers but with the instructions of the professor i didn't understand the very well.So please tell what pointers do and why to use them even if they make my life diffucult? |
|
From: Zero-c. <zer...@ot...> - 2001-01-02 15:04:50
|
I study to become softwaree enginner and i learn at the moment C for the = firdt semester!We learn to use pointers but with the instructions of the = proffesor i didn't understand the very well.So please tell what pointers = do and why to use them even if they make my life diffucult? |
|
From: James G. <Jam...@Cl...> - 2001-01-02 14:49:57
|
No, its not in the wrong place. Just set the classes cursor to NULL in the
struct you use to create the dialog. Otherwise every time you move the mouse
you are reloading and assigning the cursor.
Regards,
James.
-----Original Message-----
From: SpiderMan [mailto:Spi...@pr...]
Sent: Friday, December 29, 2000 11:44 PM
To: dev...@li...
Subject: Re [Dev-C++] Change the cursor...
Hi, thanks for the response! I figured out that the code was right, just
put in the wrong place. I found that I can load all the stock cursors by
responding to WM_MOUSEMOVE. Thanks for the help : )
----- Original Message -----
From: <mailto:Eli...@ao...> Elias Pschernig
To: <mailto:dev...@li...>
dev...@li...
Sent: Friday, December 29, 2000 10:52 AM
Subject: Re: [Dev-C++] Change the cursor...
Hi, I would like to know how to change the cursor in a simple dialog box
based program. I know that I must use SetCursor( ) and LoadCursor( ) and
ShowCursor, but I can't seem to get it working. I put this in the dialog
box's initinstance:
SetCursor( LoadCursor(NULL, IDC_WAIT) );
ShowCursor(TRUE);
But it doesn't work, the wait curor doesn't show up. Can any one help
me? Thank you in advance.
I'm not using C++, but in C i have a message WM_SETCURSOR sent to my dialog
procedure, maybe this is what you need ? Just put your code as response to
that message and the cursor changes...
_____
<http://www.privacyx.com/newads/click.php3?bannerID=7>
Link is external to the Privacyx.com System
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This electronic message and any attachment is intended to be
read by the named addressee(s) only.
Any other recipient should be aware that its contents may be
legally privileged and/or confidential and that its use,
disclosure, copying or distribution may be unlawful.
Unless you are a named addressee, please delete this message
Whilst C. & J. Clark International Limited has taken steps
to prevent the transmission of computer viruses with electronic mail,
responsibility for screening incoming messages and the risk of such
transmission and its consequences lies with the recipient.
C. & J. Clark International Limited
Registered in England and Wales
Company No. 141015
Registered Office: 40 High Street, Street, Somerset BA16 0YA
Telephone: +44 (0) 1458 443131
Fax: +44 (0) 1458 447547
|
|
From: James G. <Jam...@Cl...> - 2001-01-02 14:47:03
|
When people send e-mail with signatures it comes out with the following message because our firewall gets upset. Regards, James. -----Original Message----- From: Ramana Kumar [mailto:ra...@my...] Sent: Monday, January 01, 2001 3:37 AM To: C++ Subject: [Dev-C++] To all The Microsoft Exchange Server received an Internet message that could not be processed. To view the original message content, open the attached message. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: Alfonz K. <alf...@wd...> - 2001-01-02 14:42:10
|
unsubscribe Alfonz Koncan -----Original Message----- From: dev...@li... [mailto:dev...@li...] Sent: Tuesday, January 02, 2001 8:39 AM To: dev...@li... Subject: Dev-cpp-users digest, Vol 1 #112 - 7 msgs Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit http://lists.sourceforge.net/mailman/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: Divide error (Ioannis Vranos) 2. RE: [OT] C++ string vs char * (James Gordon) 3. RE: C99 (James Gordon) 4. RE: first time error return on checking file stream val idity (James Gordon) 5. RE: Change the cursor... (James Gordon) 6. RE: Connecting to a dll (James Gordon) --__--__-- Message: 1 From: "Ioannis Vranos" <no...@ya...> To: <dev...@li...> Subject: RE: [Dev-C++] Divide error Date: Tue, 2 Jan 2001 14:45:35 +0200 Reply-To: dev...@li... This is a multi-part message in MIME format. ------=_NextPart_000_001B_01C074CA.AA257050 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit do { scanf("%d", &quit); }while(quit>40000); Ioannis -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Frazell Thomas Sent: Tuesday, January 02, 2001 4:24 AM To: dev...@li... Subject: [Dev-C++] Divide error I managed to fix the only bug i know of in my program i used an if statement but if the user enters an exit value over 40000 the program will then continue to execute reliving the bug if anyone can help me fix this new bug i would be greatly appreciative -------------------------------------PROGRAM SOURCE CODE------------------------------------------------------- // Quadrilatric equation calculater // Written by: Frazell Thomas #include <stdio.h> #include <math.h> #include <windows.h> int a,a_2,b,c,d,answer,sroot,answer_2,b_2,b_3,div,quit,quit1; int value[10]; int ctr = 0; int nbr; char plus; main() { MessageBox (NULL, "This is Q-Calc BETA 1.1 Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + MB_ICONASTERISK); // Cpoyright and author information // If you alter this program you must list me in the credits // As the lead developer on this piece of software // I would also request that any version you release // Be forwarded to me at fra...@ya... // To keep me from re-inventing the wheel (programming code u already // Done) // This software it under the GNU public license printf("This program is designed to do quadratic equations only.\n"); printf("You are free to use this software as stated under the GNU\n"); printf("Public License (Avalible at GNU.org).\n\n"); printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n"); printf("Programmer: Frazell Thomas\n"); printf("Please visit http://www.frazellthomas.com\n\n"); // Input From User printf("Please enter the number used to represent varible A: "); scanf("%d", &a); quit = 40000; // if statement to prevent the divide error if the var. a is zero if (a == 0) { printf("\n\nYou entered Zero for varible A which will result in\n"); printf("\n\nNo possible answer please exit the program and run again\n"); printf("\n\nBut do not use A Zero for varible A\n"); printf("\nPlease Enter 33 To Quit\n"); scanf("%d", &quit); } if (quit <= 20000) { return 0; } printf("Please enter the number used to represent varible B: "); scanf("%d", &b_3); printf("Please enter the number used to represent varible C: "); scanf("%d", &c); //Raises varible b to the second power a_2 = pow(b_3, 2); // This is the part of out calc prog that does the work :O) // please alter + sign before var. c to a - if needed and vic versa sroot = (a_2 - 4 * a * c); b_2 = b_3 * 2; b = b_3 - b_2; div = 2 * a; answer = (b + sroot) / div; answer_2 = (b - sroot) / div; // Prints the answer printf("\nThe Answer Is %d and %d\n ", answer, answer_2); printf("\nThe square root of %d in this problem was %d\n ", b_3, sroot); printf("\n%d To the second power is %d ", b_3, a_2); // While loop do { puts("\n\nEnter 99 to quit "); scanf( "%d", &nbr); value[ctr] = nbr; ctr++; }while (ctr < 10 && nbr != 99); return 0; } ------=_NextPart_000_001B_01C074CA.AA257050 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 http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><STRONG><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20 class=3D687453012-02012001>do</SPAN></FONT></STRONG></DIV> <DIV><STRONG><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20 class=3D687453012-02012001>{</SPAN></FONT></STRONG></DIV> <DIV><STRONG><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20 class=3D687453012-02012001>scanf("%d", = &quit);</SPAN></FONT></STRONG></DIV> <DIV><STRONG><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20 class=3D687453012-02012001>}while(quit>40000);</SPAN></FONT></STRONG><= /DIV> <DIV><STRONG><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20 class=3D687453012-02012001></SPAN></FONT></STRONG> </DIV> <DIV><STRONG><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20 class=3D687453012-02012001></SPAN></FONT></STRONG> </DIV> <DIV><STRONG><FONT face=3DArial color=3D#000080 size=3D2><SPAN=20 class=3D687453012-02012001>Ioannis</SPAN></FONT></STRONG></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px = solid; MARGIN-RIGHT: 0px"> <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT = face=3DTahoma=20 size=3D2>-----Original Message-----<BR><B>From:</B>=20 dev...@li...=20 [mailto:dev...@li...]<B>On Behalf Of = </B>Frazell=20 Thomas<BR><B>Sent:</B> Tuesday, January 02, 2001 4:24 AM<BR><B>To:</B> = dev...@li...<BR><B>Subject:</B> [Dev-C++] = Divide=20 error<BR><BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2>I managed to fix the only bug i know = of in my=20 program i used an if statement but if the user enters an exit value = over 40000=20 the program will then continue to execute reliving the bug if anyone = can help=20 me fix this new bug i would be greatly appreciative</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial = size=3D2>-------------------------------------PROGRAM=20 SOURCE=20 CODE-------------------------------------------------------</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>// Quadrilatric equation = calculater<BR>// Written=20 by: Frazell Thomas<BR>#include <stdio.h><BR>#include=20 <math.h><BR>#include <windows.h><BR>int=20 a,a_2,b,c,d,answer,sroot,answer_2,b_2,b_3,div,quit,quit1;<BR>int=20 value[10];<BR>int ctr =3D 0;<BR>int nbr;<BR>char=20 plus;<BR>main()<BR>{ =20 <BR> MessageBox (NULL, "This is = Q-Calc=20 BETA 1.1</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Visit <A=20 = href=3D"http://www.FrazellThomas.com">http://www.FrazellThomas.com</A>" = ,=20 "Q-Calc", 0 + MB_ICONASTERISK);<BR> // = Cpoyright=20 and author information<BR> // If you = alter this=20 program you must list me in the = credits<BR> //=20 As the lead developer on this piece of=20 software<BR> // I would also request = that any=20 version you release<BR> // Be forwarded = to me at=20 <A=20 = href=3D"mailto:fra...@ya...">fra...@ya...</A><BR>&n= bsp; =20 // To keep me from re-inventing the wheel (programming code u=20 already<BR> //=20 Done)<BR> // This software it under the = GNU=20 public license<BR> printf("This program = is=20 designed to do quadratic equations=20 only.\n");<BR> printf("You are free to = use this=20 software as stated under the = GNU\n");<BR> =20 printf("Public License (Avalible at=20 GNU.org).\n\n");<BR> printf("Version: = Beta 1.1=20 12/12/2000 8:00PM EST.\n");<BR> =20 printf("Programmer: Frazell = Thomas\n");<BR> =20 printf("Please visit <A=20 = href=3D"http://www.frazellthomas.com\n\n">http://www.frazellthomas.com\n\= n</A>");<BR> =20 // Input From User<BR> printf("Please = enter the=20 number used to represent varible A: = ");<BR> =20 scanf("%d", &a);<BR> quit =3D=20 40000;<BR> // if statement to prevent = the divide=20 error if the var. a is = zero<BR> if=20 (a =3D=3D 0)<BR> =20 {<BR> = printf("\n\nYou=20 entered Zero for varible A which will result=20 in\n");<BR> =20 printf("\n\nNo possible answer please exit the program and run=20 again\n");<BR> =20 printf("\n\nBut do not use A Zero for varible=20 A\n");<BR> =20 printf("\nPlease Enter 33 To=20 Quit\n");<BR> =20 scanf("%d", = &quit);<BR> =20 = }<BR> = if=20 (quit <=3D=20 = 20000)<BR> &nb= sp; =20 {=20 = <BR> &nb= sp; =20 return=20 = 0;<BR> &= nbsp; =20 = } = =20 <BR> printf("Please enter the number = used to=20 represent varible B: ");<BR> scanf("%d", = &b_3);<BR> printf("Please enter the = number=20 used to represent varible C: ");<BR> = scanf("%d",=20 &c);<BR> //Raises varible b to the = second=20 power<BR> a_2 =3D pow(b_3,=20 2);<BR> // This is the part of out calc = prog=20 that does the work :O)<BR> // please = alter +=20 sign before var. c to a - if needed and vic=20 versa<BR> sroot =3D (a_2 - 4 * a *=20 c);<BR> b_2 =3D b_3 *=20 2;<BR> b =3D b_3 -=20 b_2;<BR> div =3D 2 *=20 a;<BR> answer =3D (b + sroot) /=20 div;<BR> answer_2 =3D (b - sroot) /=20 div;<BR> // Prints the=20 answer<BR> printf("\nThe Answer Is %d = and %d\n=20 ", answer, answer_2);<BR> printf("\nThe = square=20 root of %d in this problem was %d\n ", b_3,=20 sroot);<BR> printf("\n%d To the second = power is=20 %d ", b_3, a_2);<BR> =20 <BR> // While loop =20 = <BR> &nb= sp; =20 do<BR> =20 = {<BR> &n= bsp; =20 puts("\n\nEnter 99 to quit=20 = ");<BR> = =20 scanf( "%d",=20 = &nbr);<BR>  = ; =20 value[ctr] =3D=20 = nbr;<BR>  = ; =20 ctr++;<BR> }while (ctr = < 10=20 && nbr !=3D 99);<BR> return=20 0;<BR>}</FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_001B_01C074CA.AA257050-- --__--__-- Message: 2 From: James Gordon <Jam...@Cl...> To: "'dev...@li...'" <dev...@li...> Subject: RE: [Dev-C++] [OT] C++ string vs char * Date: Tue, 2 Jan 2001 13:50:42 -0000 Reply-To: dev...@li... C++ Strings have a lot of the functionality of the str... type functions built into the classes. If you need to pass a char* to a function you can use c_str() which returns a char*. Best to read the doc's. There's: append - to append a char* or string. c_str - to return the underlying string as a char*. find_fist_of - to find the first occurrence of a string. resize - to allocate the memory for a string. + - add two strings together. != == > < etc. - comparison. See the string header file or docs for class members. Regards, James. -----Original Message----- From: Ramana Kumar [mailto:ra...@my...] Sent: Saturday, December 30, 2000 8:56 AM To: dev...@li... Subject: RE: [Dev-C++] [OT] C++ string vs char * I'm not too good with strings, but based on your e-mail, I would go for creating a simple string class. C++ strings become a pain depending on the things you do because they aren't compatible with char[]s and vice versa (I'm writing a game that takes in a string containing a command in English and acts accordingly, i.e. "Open door" opens the door). Using char*'s/char[]s gives you good control. I don't know what you mean by bloat/efficiency, but basically, from what I understand, I think the char*s will give more "efficiency?". The only problem with the char*s is, as you said you have to do your memory management but also some useful functions in string.h (I think) don't work on them. If some of what I'm saying is complete poppycock, I do apologise, I am going by experience, not by facts from the ISO C++ "set of rules". So as I said, I would take option b. Ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of bis...@bt... Sent: Friday, December 29, 2000 9:05 PM To: dev...@li... Subject: [Dev-C++] [OT] C++ string vs char * Hi all I'm writing a small application using G++ - this one has a lot of string manipulation (It is a doxygen-like auto documentation system for a propreitory language). I seem to have three options: a) Use char *s and do my own memory management. b) Roll by own lightweight string class c) Use the C++ string class Can anyone tell me how good is the string class in terms of bloat/efficiency compared to char * ? Is (b) a viable option if what I want is basically char * with inbuild memory management ? Also, should I use (io|f|str)string ? How much of a bloat/efficiency concern is that compared to (f|s)printf/write/read and friends ? I don't plan to use the STL stuff. Thanks in advance. Biswa. _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 --__--__-- Message: 3 From: James Gordon <Jam...@Cl...> To: "'dev...@li...'" <dev...@li...> Subject: RE: [Dev-C++] C99 Date: Tue, 2 Jan 2001 13:53:40 -0000 Reply-To: dev...@li... For instance? Regards, James. -----Original Message----- From: Ioannis Vranos [mailto:no...@ya...] Sent: Saturday, December 30, 2000 12:17 PM To: Dev-C++ Subject: [Dev-C++] C99 Talking about C, has anybody in here realized what crap has been introduced in C, in C99 standard? The language has been totally ruined. Now i completely understand why K&R will not write a new book. Ioannis * Ioannis Vranos * Programming pages: http://members.nbci.com/noicys <http://members.nbci.com/noicys> * Alternative URL: http://run.to/noicys <http://run.to/noicys> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 --__--__-- Message: 4 From: James Gordon <Jam...@Cl...> To: "'dev...@li...'" <dev...@li...> Subject: RE: [Dev-C++] first time error return on checking file stream val idity Date: Tue, 2 Jan 2001 14:18:55 -0000 Reply-To: dev...@li... 1st. You should only define your defaults in the declaration of the function, and not redefine them in the definition of the function. The reason you are not getting an error the first time you access invalid is because when it is created the state bits are set to 'good'. After you have tried to write out the state is not 'bad'. If you were to test and return if the stream isn't open (is_open() returns true if the file pointer is not a null pointer). Possibly change this: if (!output_file) { cout << "Error opening file." << endl; return 1; // error indication } to this if (!output_file.is_open()) { cout << "Error opening file." << endl; return 1; // error indication } Regards, James. -----Original Message----- From: Alan Thomas [mailto:ala...@3n...] Sent: Saturday, December 30, 2000 11:19 PM To: dev...@li... Subject: [Dev-C++] first time error return on checking file stream validity The code below gives some interesting results. First return from the function start_HTML_file is 0 (no error), while the second time it returns 1 (could not open file). What does this mean? Thanks, Alan #include <iostream.h> #include <stdlib.h> #include <fstream.h> #include <string.h> // define HTML author const char *Author = "Alan Thomas"; // // function prototype // int start_HTML_file (ofstream&output_file, char *keywords = NULL, char *title = NULL); int main() { ofstream invalid; // used to test for error opening file // Test invalid file checking cout << "Error return was " << start_HTML_file (invalid, NULL, "This is the title") << endl; cout << "Error return was " << start_HTML_file (invalid, NULL, "This is the title") << endl; system("PAUSE"); return 0; } int start_HTML_file (ofstream&output_file, char *keywords = NULL, char *title = NULL) { if (!output_file) { cout << "Error opening file." << endl; return 1; // error indication } // Write header information output_file << "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">"; output_file << endl; output_file << "<html>" << endl; output_file << "<head>" << endl; output_file << "<meta http-equiv=\"Content-Type\" content-\"text/html; charset=iso-8859-1\""; output_file << endl; output_file << "<meta name=\"Author\" content=\"" << Author << "\">" << endl; if (keywords != NULL) { output_file << "<meta name=\"KeyWords\" content=\""; output_file << keywords << ">\"" << endl; } // Write out title if (title != NULL) { output_file << "<title>"; output_file << title; output_file << "</title>" << endl; } // End header output_file << "</head>" << endl; return 0; } * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 --__--__-- Message: 5 From: James Gordon <Jam...@Cl...> To: "'dev...@li...'" <dev...@li...> Subject: RE: [Dev-C++] Change the cursor... Date: Tue, 2 Jan 2001 14:31:51 -0000 Reply-To: dev...@li... See http://msdn.microsoft.com/library/psdk/winui/cursors_2mcy.htm <http://msdn.microsoft.com/library/psdk/winui/cursors_2mcy.htm> Especially note : If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to NULL. If the class cursor is not NULL, the system restores the class cursor each time the mouse is moved. The cursor is not shown on the screen if the internal cursor display count is less than zero. This occurs if the application uses the <http://msdn.microsoft.com/library/psdk/winui/cursors_1gky.htm> ShowCursor function to hide the cursor more times than to show the cursor. Regards, James. -----Original Message----- From: Elias Pschernig [mailto:Eli...@ao...] Sent: Friday, December 29, 2000 6:52 PM To: dev...@li... Subject: Re: [Dev-C++] Change the cursor... Hi, I would like to know how to change the cursor in a simple dialog box based program. I know that I must use SetCursor( ) and LoadCursor( ) and ShowCursor, but I can't seem to get it working. I put this in the dialog box's initinstance: SetCursor( LoadCursor(NULL, IDC_WAIT) ); ShowCursor(TRUE); But it doesn't work, the wait curor doesn't show up. Can any one help me? Thank you in advance. I'm not using C++, but in C i have a message WM_SETCURSOR sent to my dialog procedure, maybe this is what you need ? Just put your code as response to that message and the cursor changes... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 --__--__-- Message: 6 From: James Gordon <Jam...@Cl...> To: "'dev...@li...'" <dev...@li...> Subject: RE: [Dev-C++] Connecting to a dll Date: Tue, 2 Jan 2001 14:34:13 -0000 Reply-To: dev...@li... You include the .lib file in your linker settings, this allows for compile time references to be checked etc. Your application will use the .dll file at runtime. Regards, James. -----Original Message----- From: Quentin Smith [mailto:mac...@bi...] Sent: Sunday, December 31, 2000 5:51 PM To: dev...@li... Subject: [Dev-C++] Connecting to a dll Hi- I am investigating a library. It installs ok, and I have sorted out the header issues, but they only provide a .lib file and a .dll file. I know there is a .lib-to-.a converter out there, but I am unable to find it. However, is it possible to link my program with the dll at linking time? The only errors I get with my program are undefined symbols during linking. --Quentin * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 --__--__-- _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users End of Dev-cpp-users Digest |
|
From: James G. <Jam...@Cl...> - 2001-01-02 14:37:26
|
You include the .lib file in your linker settings, this allows for compile time references to be checked etc. Your application will use the .dll file at runtime. Regards, James. -----Original Message----- From: Quentin Smith [mailto:mac...@bi...] Sent: Sunday, December 31, 2000 5:51 PM To: dev...@li... Subject: [Dev-C++] Connecting to a dll Hi- I am investigating a library. It installs ok, and I have sorted out the header issues, but they only provide a .lib file and a .dll file. I know there is a .lib-to-.a converter out there, but I am unable to find it. However, is it possible to link my program with the dll at linking time? The only errors I get with my program are undefined symbols during linking. --Quentin * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: James G. <Jam...@Cl...> - 2001-01-02 14:35:02
|
See http://msdn.microsoft.com/library/psdk/winui/cursors_2mcy.htm <http://msdn.microsoft.com/library/psdk/winui/cursors_2mcy.htm> Especially note : If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to NULL. If the class cursor is not NULL, the system restores the class cursor each time the mouse is moved. The cursor is not shown on the screen if the internal cursor display count is less than zero. This occurs if the application uses the <http://msdn.microsoft.com/library/psdk/winui/cursors_1gky.htm> ShowCursor function to hide the cursor more times than to show the cursor. Regards, James. -----Original Message----- From: Elias Pschernig [mailto:Eli...@ao...] Sent: Friday, December 29, 2000 6:52 PM To: dev...@li... Subject: Re: [Dev-C++] Change the cursor... Hi, I would like to know how to change the cursor in a simple dialog box based program. I know that I must use SetCursor( ) and LoadCursor( ) and ShowCursor, but I can't seem to get it working. I put this in the dialog box's initinstance: SetCursor( LoadCursor(NULL, IDC_WAIT) ); ShowCursor(TRUE); But it doesn't work, the wait curor doesn't show up. Can any one help me? Thank you in advance. I'm not using C++, but in C i have a message WM_SETCURSOR sent to my dialog procedure, maybe this is what you need ? Just put your code as response to that message and the cursor changes... * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: James G. <Jam...@Cl...> - 2001-01-02 14:22:07
|
1st. You should only define your defaults in the declaration of the
function, and not redefine them in the definition of the function.
The reason you are not getting an error the first time you access invalid is
because when it is created the state bits are set to 'good'. After you have
tried to write out the state is not 'bad'. If you were to test and return if
the stream isn't open (is_open() returns true if the file pointer is not a
null pointer).
Possibly change this:
if (!output_file)
{
cout << "Error opening file." << endl;
return 1; // error indication
}
to this
if (!output_file.is_open())
{
cout << "Error opening file." << endl;
return 1; // error indication
}
Regards,
James.
-----Original Message-----
From: Alan Thomas [mailto:ala...@3n...]
Sent: Saturday, December 30, 2000 11:19 PM
To: dev...@li...
Subject: [Dev-C++] first time error return on checking file stream validity
The code below gives some interesting results. First return from the
function start_HTML_file is 0 (no error), while the second time it returns 1
(could not open file). What does this mean?
Thanks, Alan
#include <iostream.h>
#include <stdlib.h>
#include <fstream.h>
#include <string.h>
// define HTML author
const char *Author = "Alan Thomas";
//
// function prototype
//
int start_HTML_file (ofstream&output_file, char *keywords = NULL,
char *title = NULL);
int main()
{
ofstream invalid; // used to test for error opening file
// Test invalid file checking
cout << "Error return was " << start_HTML_file (invalid, NULL,
"This is the title") << endl;
cout << "Error return was " << start_HTML_file (invalid, NULL,
"This is the title") << endl;
system("PAUSE");
return 0;
}
int start_HTML_file (ofstream&output_file, char *keywords = NULL, char
*title = NULL)
{
if (!output_file)
{
cout << "Error opening file." << endl;
return 1; // error indication
}
// Write header information
output_file << "<!doctype html public \"-//w3c//dtd html 4.0
transitional//en\">";
output_file << endl;
output_file << "<html>" << endl;
output_file << "<head>" << endl;
output_file << "<meta http-equiv=\"Content-Type\" content-\"text/html;
charset=iso-8859-1\"";
output_file << endl;
output_file << "<meta name=\"Author\" content=\"" << Author << "\">" <<
endl;
if (keywords != NULL)
{
output_file << "<meta name=\"KeyWords\" content=\"";
output_file << keywords << ">\"" << endl;
}
// Write out title
if (title != NULL)
{
output_file << "<title>";
output_file << title;
output_file << "</title>" << endl;
}
// End header
output_file << "</head>" << endl;
return 0;
}
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This electronic message and any attachment is intended to be
read by the named addressee(s) only.
Any other recipient should be aware that its contents may be
legally privileged and/or confidential and that its use,
disclosure, copying or distribution may be unlawful.
Unless you are a named addressee, please delete this message
Whilst C. & J. Clark International Limited has taken steps
to prevent the transmission of computer viruses with electronic mail,
responsibility for screening incoming messages and the risk of such
transmission and its consequences lies with the recipient.
C. & J. Clark International Limited
Registered in England and Wales
Company No. 141015
Registered Office: 40 High Street, Street, Somerset BA16 0YA
Telephone: +44 (0) 1458 443131
Fax: +44 (0) 1458 447547
|
|
From: James G. <Jam...@Cl...> - 2001-01-02 13:57:00
|
For instance? Regards, James. -----Original Message----- From: Ioannis Vranos [mailto:no...@ya...] Sent: Saturday, December 30, 2000 12:17 PM To: Dev-C++ Subject: [Dev-C++] C99 Talking about C, has anybody in here realized what crap has been introduced in C, in C99 standard? The language has been totally ruined. Now i completely understand why K&R will not write a new book. Ioannis * Ioannis Vranos * Programming pages: http://members.nbci.com/noicys <http://members.nbci.com/noicys> * Alternative URL: http://run.to/noicys <http://run.to/noicys> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: James G. <Jam...@Cl...> - 2001-01-02 13:53:54
|
C++ Strings have a lot of the functionality of the str... type functions built into the classes. If you need to pass a char* to a function you can use c_str() which returns a char*. Best to read the doc's. There's: append - to append a char* or string. c_str - to return the underlying string as a char*. find_fist_of - to find the first occurrence of a string. resize - to allocate the memory for a string. + - add two strings together. != == > < etc. - comparison. See the string header file or docs for class members. Regards, James. -----Original Message----- From: Ramana Kumar [mailto:ra...@my...] Sent: Saturday, December 30, 2000 8:56 AM To: dev...@li... Subject: RE: [Dev-C++] [OT] C++ string vs char * I'm not too good with strings, but based on your e-mail, I would go for creating a simple string class. C++ strings become a pain depending on the things you do because they aren't compatible with char[]s and vice versa (I'm writing a game that takes in a string containing a command in English and acts accordingly, i.e. "Open door" opens the door). Using char*'s/char[]s gives you good control. I don't know what you mean by bloat/efficiency, but basically, from what I understand, I think the char*s will give more "efficiency?". The only problem with the char*s is, as you said you have to do your memory management but also some useful functions in string.h (I think) don't work on them. If some of what I'm saying is complete poppycock, I do apologise, I am going by experience, not by facts from the ISO C++ "set of rules". So as I said, I would take option b. Ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of bis...@bt... Sent: Friday, December 29, 2000 9:05 PM To: dev...@li... Subject: [Dev-C++] [OT] C++ string vs char * Hi all I'm writing a small application using G++ - this one has a lot of string manipulation (It is a doxygen-like auto documentation system for a propreitory language). I seem to have three options: a) Use char *s and do my own memory management. b) Roll by own lightweight string class c) Use the C++ string class Can anyone tell me how good is the string class in terms of bloat/efficiency compared to char * ? Is (b) a viable option if what I want is basically char * with inbuild memory management ? Also, should I use (io|f|str)string ? How much of a bloat/efficiency concern is that compared to (f|s)printf/write/read and friends ? I don't plan to use the STL stuff. Thanks in advance. Biswa. _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |
|
From: Ioannis V. <no...@ya...> - 2001-01-02 12:44:07
|
do
{
scanf("%d", &quit);
}while(quit>40000);
Ioannis
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Frazell
Thomas
Sent: Tuesday, January 02, 2001 4:24 AM
To: dev...@li...
Subject: [Dev-C++] Divide error
I managed to fix the only bug i know of in my program i used an if
statement but if the user enters an exit value over 40000 the program will
then continue to execute reliving the bug if anyone can help me fix this new
bug i would be greatly appreciative
-------------------------------------PROGRAM SOURCE
CODE-------------------------------------------------------
// Quadrilatric equation calculater
// Written by: Frazell Thomas
#include <stdio.h>
#include <math.h>
#include <windows.h>
int a,a_2,b,c,d,answer,sroot,answer_2,b_2,b_3,div,quit,quit1;
int value[10];
int ctr = 0;
int nbr;
char plus;
main()
{
MessageBox (NULL, "This is Q-Calc BETA 1.1
Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + MB_ICONASTERISK);
// Cpoyright and author information
// If you alter this program you must list me in the credits
// As the lead developer on this piece of software
// I would also request that any version you release
// Be forwarded to me at fra...@ya...
// To keep me from re-inventing the wheel (programming code u
already
// Done)
// This software it under the GNU public license
printf("This program is designed to do quadratic equations
only.\n");
printf("You are free to use this software as stated under the
GNU\n");
printf("Public License (Avalible at GNU.org).\n\n");
printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n");
printf("Programmer: Frazell Thomas\n");
printf("Please visit http://www.frazellthomas.com\n\n");
// Input From User
printf("Please enter the number used to represent varible A: ");
scanf("%d", &a);
quit = 40000;
// if statement to prevent the divide error if the var. a is zero
if (a == 0)
{
printf("\n\nYou entered Zero for varible A which will result
in\n");
printf("\n\nNo possible answer please exit the program and run
again\n");
printf("\n\nBut do not use A Zero for varible A\n");
printf("\nPlease Enter 33 To Quit\n");
scanf("%d", &quit);
}
if (quit <= 20000)
{
return 0;
}
printf("Please enter the number used to represent varible B: ");
scanf("%d", &b_3);
printf("Please enter the number used to represent varible C: ");
scanf("%d", &c);
//Raises varible b to the second power
a_2 = pow(b_3, 2);
// This is the part of out calc prog that does the work :O)
// please alter + sign before var. c to a - if needed and vic versa
sroot = (a_2 - 4 * a * c);
b_2 = b_3 * 2;
b = b_3 - b_2;
div = 2 * a;
answer = (b + sroot) / div;
answer_2 = (b - sroot) / div;
// Prints the answer
printf("\nThe Answer Is %d and %d\n ", answer, answer_2);
printf("\nThe square root of %d in this problem was %d\n ", b_3,
sroot);
printf("\n%d To the second power is %d ", b_3, a_2);
// While loop
do
{
puts("\n\nEnter 99 to quit ");
scanf( "%d", &nbr);
value[ctr] = nbr;
ctr++;
}while (ctr < 10 && nbr != 99);
return 0;
}
|
|
From: Ioannis V. <no...@ya...> - 2001-01-02 12:44:00
|
#include <stdio.h> [...] getchar(); Ioannis -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Wien Hong Sent: Tuesday, January 02, 2001 4:04 AM To: dev...@li... Subject: [Dev-C++] the ways to prevent the dos windows been closed When executing my dos program, it closes automatically. I understand that I can change this by putting system(“PAUSE”); at the end of my source. Is there any other way to do this? I just don't to type it in my program. Thanks for your help. Wien |
|
From: Frazell T. <fr...@fl...> - 2001-01-02 10:27:59
|
Thank you very much i like what you did to correct my divide error bug =
it was what i wanted to do all along :O) i guess my mistakes showed im =
truley a newbie i will add you to my prog. thanks again
----- Original Message -----=20
From: Hoo Hong=20
To: dev...@li...=20
Sent: Tuesday, January 02, 2001 3:56 AM
Subject: Re: [Dev-C++] Sorry
hi,
there are few things I would like to comment:
1. to solve a quadratic equation ax^2 + bx + c =3D 0, 2 criteria have =
to be met.
(a) a <> 0 (which you have done)
(b) b^2 >=3D 4 * a * c , or else the solution would be a pair of =
complex numbers
2. your did not take the square root for sroot, which is sroot =3D =
sqrt (a_2 - 4 * a * c)
3. the statement:
b_2 =3D b_3 * 2;
b =3D b_3 - b_2;
is a bit redundant.
since
b_2 =3D b_3*2
thus=20
b =3D b_3 - b_2
=3D> b =3D b_3 - ( 2 * b_3)
=3D> b =3D - b_3
I have changed your source, and simply quite number of places, hope =
this may help.
--------------------------------------PROGRAM =
CODE---------------------------------------------------------------------=
----------------------------------------
=20
// Quadrilatric equation calculater
// Written by: Frazell Thomas
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <windows.h>
int a,b,c;
float sroot, divide, answer_1, answer_2;
double determinent;
int main()
{ =20
MessageBox (NULL, "This is Q-Calc BETA 1.1
=20
Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + MB_ICONASTERISK);
// Cpoyright and author information
// If you alter this program you must list me in the credits
// As the lead developer on this piece of software
// I would also request that any version you release
// Be forwarded to me at fra...@ya...
// To keep me from re-inventing the wheel (programming code u =
already
// Done)
// This software it under the GNU public license
printf("This program is designed to do quadratic equations =
only.\n");
printf("You are free to use this software as stated under the =
GNU\n");
printf("Public License (Avalible at GNU.org).\n\n");
printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n");
printf("Programmer: Frazell Thomas\n");
printf("Please visit http://www.frazellthomas.com\n\n");
// Input From User
printf("Please enter the number used to represent varible A: ");
scanf("%d", &a);
// if statement to prevent the divide error if the var. a is =
zero
if (a =3D=3D 0)
{
printf("\nSorry you entered 0 this will result in an error =
try again.");
printf("\nPlease enter the number used to represent varible =
A: ");
printf("\nEnter 0 again to quit: ");
scanf("%d", &a);
if (a=3D=3D0)
{
return 0;
}
} =20
printf("\nPlease enter the number used to represent varible B: =
");
scanf("%d", &b);
printf("\nPlease enter the number used to represent varible C: =
");
scanf("%d", &c);
determinent =3D (pow(b,2) - 4*a*c);
if (determinent < 0)
{
printf("\nSorry b^2 < 4*a*c , unable to solve this quadratic =
equation\n");
system("Pause");
return 0;=20
}
sroot =3D sqrt(determinent);
divide =3D 2 * a;
answer_1 =3D (-b - sroot) / divide;
answer_2 =3D (-b + sroot) / divide;
=20
// Prints the answer
printf("\nThe Answer Is %.4f and %.4f\n ", answer_1, answer_2);
=20
system("Pause"); =20
}
----- Original Message -----=20
From: Frazell Thomas=20
To: dev...@li...=20
Sent: Tuesday, January 02, 2001 1:27 PM
Subject: [Dev-C++] Sorry
Sorry i was an idiot i wasted everyones time trying to fix a bug =
that really was fixed by the lines of code i used to quit my prog. =
already well below is the updated code if anyone has ideas on how it can =
be more simple to present to other developers let me know
--------------------------------------PROGRAM =
CODE---------------------------------------------------------------------=
----------------------------------------
// Quadrilatric equation calculater
// Written by: Frazell Thomas
#include <stdio.h>
#include <math.h>
#include <windows.h>
int a,a_2,b,c,d,answer,sroot,answer_2,b_2,b_3,div,quit,quit1;
int value[10];
int ctr =3D 0;
int nbr;
char plus;
main()
{ =20
MessageBox (NULL, "This is Q-Calc BETA 1.1
Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + =
MB_ICONASTERISK);
// Cpoyright and author information
// If you alter this program you must list me in the credits
// As the lead developer on this piece of software
// I would also request that any version you release
// Be forwarded to me at fra...@ya...
// To keep me from re-inventing the wheel (programming code u =
already
// Done)
// This software it under the GNU public license
printf("This program is designed to do quadratic equations =
only.\n");
printf("You are free to use this software as stated under the =
GNU\n");
printf("Public License (Avalible at GNU.org).\n\n");
printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n");
printf("Programmer: Frazell Thomas\n");
printf("Please visit http://www.frazellthomas.com\n\n");
// Input From User
printf("Please enter the number used to represent varible A: =
");
scanf("%d", &a);
quit =3D 40000;
// if statement to prevent the divide error if the var. a is =
zero
if (a =3D=3D 0)
{
do
{
puts("\nSorry you entered 0 this will result in an =
error try again.");
puts("\n\nEnter 99 to quit: ");
scanf( "%d", &nbr);
value[ctr] =3D nbr;
ctr++;
}
while (ctr < 10 && nbr !=3D 99);
return 0;
} =20
printf("Please enter the number used to represent varible B: =
");
scanf("%d", &b_3);
printf("Please enter the number used to represent varible C: =
");
scanf("%d", &c);
//Raises varible b to the second power
a_2 =3D pow(b_3, 2);
// This is the part of out calc prog that does the work :O)
// please alter + sign before var. c to a - if needed and vic =
versa
sroot =3D (a_2 - 4 * a * c);
b_2 =3D b_3 * 2;
b =3D b_3 - b_2;
div =3D 2 * a;
answer =3D (b + sroot) / div;
answer_2 =3D (b - sroot) / div;
// Prints the answer
printf("\nThe Answer Is %d and %d\n ", answer, answer_2);
printf("\nThe square root of %d in this problem was %d\n ", =
b_3, sroot);
printf("\n%d To the second power is %d ", b_3, a_2);
=20
// While loop =20
do
{
puts("\n\nEnter 99 to quit: ");
scanf( "%d", &nbr);
value[ctr] =3D nbr;
ctr++;
}while (ctr < 10 && nbr !=3D 99);
return 0;
}
|
|
From: Hoo H. <hoo...@ho...> - 2001-01-02 08:55:34
|
hi,
there are few things I would like to comment:
1. to solve a quadratic equation ax^2 + bx + c =3D 0, 2 criteria have to =
be met.
(a) a <> 0 (which you have done)
(b) b^2 >=3D 4 * a * c , or else the solution would be a pair of =
complex numbers
2. your did not take the square root for sroot, which is sroot =3D sqrt =
(a_2 - 4 * a * c)
3. the statement:
b_2 =3D b_3 * 2;
b =3D b_3 - b_2;
is a bit redundant.
since
b_2 =3D b_3*2
thus=20
b =3D b_3 - b_2
=3D> b =3D b_3 - ( 2 * b_3)
=3D> b =3D - b_3
I have changed your source, and simply quite number of places, hope this =
may help.
=20
--------------------------------------PROGRAM =
CODE---------------------------------------------------------------------=
----------------------------------------
=20
// Quadrilatric equation calculater
// Written by: Frazell Thomas
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <windows.h>
int a,b,c;
float sroot, divide, answer_1, answer_2;
double determinent;
int main()
{ =20
MessageBox (NULL, "This is Q-Calc BETA 1.1
=20
Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + MB_ICONASTERISK);
// Cpoyright and author information
// If you alter this program you must list me in the credits
// As the lead developer on this piece of software
// I would also request that any version you release
// Be forwarded to me at fra...@ya...
// To keep me from re-inventing the wheel (programming code u =
already
// Done)
// This software it under the GNU public license
printf("This program is designed to do quadratic equations =
only.\n");
printf("You are free to use this software as stated under the =
GNU\n");
printf("Public License (Avalible at GNU.org).\n\n");
printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n");
printf("Programmer: Frazell Thomas\n");
printf("Please visit http://www.frazellthomas.com\n\n");
// Input From User
printf("Please enter the number used to represent varible A: ");
scanf("%d", &a);
// if statement to prevent the divide error if the var. a is zero
if (a =3D=3D 0)
{
printf("\nSorry you entered 0 this will result in an error try =
again.");
printf("\nPlease enter the number used to represent varible A: =
");
printf("\nEnter 0 again to quit: ");
scanf("%d", &a);
if (a=3D=3D0)
{
return 0;
}
} =20
printf("\nPlease enter the number used to represent varible B: ");
scanf("%d", &b);
printf("\nPlease enter the number used to represent varible C: ");
scanf("%d", &c);
determinent =3D (pow(b,2) - 4*a*c);
if (determinent < 0)
{
printf("\nSorry b^2 < 4*a*c , unable to solve this quadratic =
equation\n");
system("Pause");
return 0;=20
}
sroot =3D sqrt(determinent);
divide =3D 2 * a;
answer_1 =3D (-b - sroot) / divide;
answer_2 =3D (-b + sroot) / divide;
=20
// Prints the answer
printf("\nThe Answer Is %.4f and %.4f\n ", answer_1, answer_2);
=20
system("Pause"); =20
}
----- Original Message -----=20
From: Frazell Thomas=20
To: dev...@li...=20
Sent: Tuesday, January 02, 2001 1:27 PM
Subject: [Dev-C++] Sorry
Sorry i was an idiot i wasted everyones time trying to fix a bug that =
really was fixed by the lines of code i used to quit my prog. already =
well below is the updated code if anyone has ideas on how it can be more =
simple to present to other developers let me know
--------------------------------------PROGRAM =
CODE---------------------------------------------------------------------=
----------------------------------------
// Quadrilatric equation calculater
// Written by: Frazell Thomas
#include <stdio.h>
#include <math.h>
#include <windows.h>
int a,a_2,b,c,d,answer,sroot,answer_2,b_2,b_3,div,quit,quit1;
int value[10];
int ctr =3D 0;
int nbr;
char plus;
main()
{ =20
MessageBox (NULL, "This is Q-Calc BETA 1.1
Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + MB_ICONASTERISK);
// Cpoyright and author information
// If you alter this program you must list me in the credits
// As the lead developer on this piece of software
// I would also request that any version you release
// Be forwarded to me at fra...@ya...
// To keep me from re-inventing the wheel (programming code u =
already
// Done)
// This software it under the GNU public license
printf("This program is designed to do quadratic equations =
only.\n");
printf("You are free to use this software as stated under the =
GNU\n");
printf("Public License (Avalible at GNU.org).\n\n");
printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n");
printf("Programmer: Frazell Thomas\n");
printf("Please visit http://www.frazellthomas.com\n\n");
// Input From User
printf("Please enter the number used to represent varible A: ");
scanf("%d", &a);
quit =3D 40000;
// if statement to prevent the divide error if the var. a is =
zero
if (a =3D=3D 0)
{
do
{
puts("\nSorry you entered 0 this will result in an =
error try again.");
puts("\n\nEnter 99 to quit: ");
scanf( "%d", &nbr);
value[ctr] =3D nbr;
ctr++;
}
while (ctr < 10 && nbr !=3D 99);
return 0;
} =20
printf("Please enter the number used to represent varible B: ");
scanf("%d", &b_3);
printf("Please enter the number used to represent varible C: ");
scanf("%d", &c);
//Raises varible b to the second power
a_2 =3D pow(b_3, 2);
// This is the part of out calc prog that does the work :O)
// please alter + sign before var. c to a - if needed and vic =
versa
sroot =3D (a_2 - 4 * a * c);
b_2 =3D b_3 * 2;
b =3D b_3 - b_2;
div =3D 2 * a;
answer =3D (b + sroot) / div;
answer_2 =3D (b - sroot) / div;
// Prints the answer
printf("\nThe Answer Is %d and %d\n ", answer, answer_2);
printf("\nThe square root of %d in this problem was %d\n ", b_3, =
sroot);
printf("\n%d To the second power is %d ", b_3, a_2);
=20
// While loop =20
do
{
puts("\n\nEnter 99 to quit: ");
scanf( "%d", &nbr);
value[ctr] =3D nbr;
ctr++;
}while (ctr < 10 && nbr !=3D 99);
return 0;
}
|
|
From: Anders N. <a.n...@de...> - 2001-01-02 08:41:00
|
Hi!
A week ago Ioannis wrote that you can use system("cls") instead of =
clrscr in Dev-C++. Thank you very much for the tip.
Is there any method to do the same with gotoxy(x, y)? I would like tho =
use this function in Dev-C++.
Thanks,
Anders
|
|
From: Frazell T. <fr...@fl...> - 2001-01-02 05:28:35
|
Sorry i was an idiot i wasted everyones time trying to fix a bug that =
really was fixed by the lines of code i used to quit my prog. already =
well below is the updated code if anyone has ideas on how it can be more =
simple to present to other developers let me know
--------------------------------------PROGRAM =
CODE---------------------------------------------------------------------=
----------------------------------------
// Quadrilatric equation calculater
// Written by: Frazell Thomas
#include <stdio.h>
#include <math.h>
#include <windows.h>
int a,a_2,b,c,d,answer,sroot,answer_2,b_2,b_3,div,quit,quit1;
int value[10];
int ctr =3D 0;
int nbr;
char plus;
main()
{ =20
MessageBox (NULL, "This is Q-Calc BETA 1.1
Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + MB_ICONASTERISK);
// Cpoyright and author information
// If you alter this program you must list me in the credits
// As the lead developer on this piece of software
// I would also request that any version you release
// Be forwarded to me at fra...@ya...
// To keep me from re-inventing the wheel (programming code u =
already
// Done)
// This software it under the GNU public license
printf("This program is designed to do quadratic equations =
only.\n");
printf("You are free to use this software as stated under the =
GNU\n");
printf("Public License (Avalible at GNU.org).\n\n");
printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n");
printf("Programmer: Frazell Thomas\n");
printf("Please visit http://www.frazellthomas.com\n\n");
// Input From User
printf("Please enter the number used to represent varible A: ");
scanf("%d", &a);
quit =3D 40000;
// if statement to prevent the divide error if the var. a is zero
if (a =3D=3D 0)
{
do
{
puts("\nSorry you entered 0 this will result in an error =
try again.");
puts("\n\nEnter 99 to quit: ");
scanf( "%d", &nbr);
value[ctr] =3D nbr;
ctr++;
}
while (ctr < 10 && nbr !=3D 99);
return 0;
} =20
printf("Please enter the number used to represent varible B: ");
scanf("%d", &b_3);
printf("Please enter the number used to represent varible C: ");
scanf("%d", &c);
//Raises varible b to the second power
a_2 =3D pow(b_3, 2);
// This is the part of out calc prog that does the work :O)
// please alter + sign before var. c to a - if needed and vic =
versa
sroot =3D (a_2 - 4 * a * c);
b_2 =3D b_3 * 2;
b =3D b_3 - b_2;
div =3D 2 * a;
answer =3D (b + sroot) / div;
answer_2 =3D (b - sroot) / div;
// Prints the answer
printf("\nThe Answer Is %d and %d\n ", answer, answer_2);
printf("\nThe square root of %d in this problem was %d\n ", b_3, =
sroot);
printf("\n%d To the second power is %d ", b_3, a_2);
=20
// While loop =20
do
{
puts("\n\nEnter 99 to quit: ");
scanf( "%d", &nbr);
value[ctr] =3D nbr;
ctr++;
}while (ctr < 10 && nbr !=3D 99);
return 0;
}
|
|
From: Arjen W. <ar...@wi...> - 2001-01-02 05:18:29
|
Thank you -- Arjen -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Ramana Kumar Sent: Monday, January 01, 2001 8:34 PM To: dev...@li... Subject: RE: [Dev-C++] Plain text messages I am sorry that I have been perceived this way. As a result of the recent debate regarding graphics, I will use plain text when using the mailing list. Thank you for your co-operation and sorry for any inconvenience, Ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Arjen Wiersma Sent: Tuesday, January 02, 2001 12:14 PM To: dev...@li... Subject: RE: [Dev-C++] Plain text messages Ramana, With all due respect... that is very rude... If one of my friends sends me an picture of their family, I wish to receive it... I do not with to receive your signature picture... It totally does not add anything to you message, if you want to make your company known you can do so in plain text. In the netherlands a dial up connection costs money, per second. I don't know what kind of connection you have, but on a dial up connection it sure slows the download down. Maybe the moderator of this group should see if it is possible to filter out messages with images on user request? There are many lists that givve you the possibility to receive messages in HTML or plain text. If such a option exists and is used then I don't mind you signature, but as it is it is an extra load. Regards, Arjen -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Ramana Kumar Sent: Monday, January 01, 2001 5:02 PM To: C++ Subject: [Dev-C++] Plain text messages Ok, I'm sorry. I didn't realise it took you very long to download my messages, It takes me the same time to view/download/send plain text as with HTML. As you can see, I have taken away the background, but the signature stays, if you are using a web-based email, I can't help you, but if you are using a client, there are ways, in many of them, to not receive graphics if you don't want to. If you would like help on this issue, fell free to ask. ICQ# 93667117 To get paid for surfing the internet, please visit AllAdvantage.com. _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
|
From: Ramana K. <ra...@my...> - 2001-01-02 04:43:22
|
As you know I am now using plain text. I need to send this message to test the settings I have used in Microsoft Outlook/Microsoft Word. Code text Signature: Xerchzkopfinc. Ramana Kumar <mailto:ra...@my...> ICQ# 93667117 To get paid for surfing the net please visit AllAdvantage.com <http://www.alladvantage.com/join.asp?refid=jpn471> . |
|
From: Ramana K. <ra...@my...> - 2001-01-02 04:31:47
|
I am sorry that I have been perceived this way. As a result of the recent debate regarding graphics, I will use plain text when using the mailing list. Thank you for your co-operation and sorry for any inconvenience, Ramana -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Arjen Wiersma Sent: Tuesday, January 02, 2001 12:14 PM To: dev...@li... Subject: RE: [Dev-C++] Plain text messages Ramana, With all due respect... that is very rude... If one of my friends sends me an picture of their family, I wish to receive it... I do not with to receive your signature picture... It totally does not add anything to you message, if you want to make your company known you can do so in plain text. In the netherlands a dial up connection costs money, per second. I don't know what kind of connection you have, but on a dial up connection it sure slows the download down. Maybe the moderator of this group should see if it is possible to filter out messages with images on user request? There are many lists that givve you the possibility to receive messages in HTML or plain text. If such a option exists and is used then I don't mind you signature, but as it is it is an extra load. Regards, Arjen -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Ramana Kumar Sent: Monday, January 01, 2001 5:02 PM To: C++ Subject: [Dev-C++] Plain text messages Ok, I'm sorry. I didn't realise it took you very long to download my messages, It takes me the same time to view/download/send plain text as with HTML. As you can see, I have taken away the background, but the signature stays, if you are using a web-based email, I can't help you, but if you are using a client, there are ways, in many of them, to not receive graphics if you don't want to. If you would like help on this issue, fell free to ask. ICQ# 93667117 To get paid for surfing the internet, please visit AllAdvantage.com. _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
|
From: Frazell T. <fr...@fl...> - 2001-01-02 02:23:51
|
I managed to fix the only bug i know of in my program i used an if =
statement but if the user enters an exit value over 40000 the program =
will then continue to execute reliving the bug if anyone can help me fix =
this new bug i would be greatly appreciative
-------------------------------------PROGRAM SOURCE =
CODE-------------------------------------------------------
// Quadrilatric equation calculater
// Written by: Frazell Thomas
#include <stdio.h>
#include <math.h>
#include <windows.h>
int a,a_2,b,c,d,answer,sroot,answer_2,b_2,b_3,div,quit,quit1;
int value[10];
int ctr =3D 0;
int nbr;
char plus;
main()
{ =20
MessageBox (NULL, "This is Q-Calc BETA 1.1
Visit http://www.FrazellThomas.com" , "Q-Calc", 0 + MB_ICONASTERISK);
// Cpoyright and author information
// If you alter this program you must list me in the credits
// As the lead developer on this piece of software
// I would also request that any version you release
// Be forwarded to me at fra...@ya...
// To keep me from re-inventing the wheel (programming code u =
already
// Done)
// This software it under the GNU public license
printf("This program is designed to do quadratic equations =
only.\n");
printf("You are free to use this software as stated under the =
GNU\n");
printf("Public License (Avalible at GNU.org).\n\n");
printf("Version: Beta 1.1 12/12/2000 8:00PM EST.\n");
printf("Programmer: Frazell Thomas\n");
printf("Please visit http://www.frazellthomas.com\n\n");
// Input From User
printf("Please enter the number used to represent varible A: ");
scanf("%d", &a);
quit =3D 40000;
// if statement to prevent the divide error if the var. a is zero
if (a =3D=3D 0)
{
printf("\n\nYou entered Zero for varible A which will result =
in\n");
printf("\n\nNo possible answer please exit the program and run =
again\n");
printf("\n\nBut do not use A Zero for varible A\n");
printf("\nPlease Enter 33 To Quit\n");
scanf("%d", &quit);
}
if (quit <=3D 20000)
{=20
return 0;
} =20
printf("Please enter the number used to represent varible B: ");
scanf("%d", &b_3);
printf("Please enter the number used to represent varible C: ");
scanf("%d", &c);
//Raises varible b to the second power
a_2 =3D pow(b_3, 2);
// This is the part of out calc prog that does the work :O)
// please alter + sign before var. c to a - if needed and vic =
versa
sroot =3D (a_2 - 4 * a * c);
b_2 =3D b_3 * 2;
b =3D b_3 - b_2;
div =3D 2 * a;
answer =3D (b + sroot) / div;
answer_2 =3D (b - sroot) / div;
// Prints the answer
printf("\nThe Answer Is %d and %d\n ", answer, answer_2);
printf("\nThe square root of %d in this problem was %d\n ", b_3, =
sroot);
printf("\n%d To the second power is %d ", b_3, a_2);
=20
// While loop =20
do
{
puts("\n\nEnter 99 to quit ");
scanf( "%d", &nbr);
value[ctr] =3D nbr;
ctr++;
}while (ctr < 10 && nbr !=3D 99);
return 0;
}
|