--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00003 Date: 01/17/98 From: JONATHAN DE BOYNE POLLARD Time: 11:53pm \/To: DAVID NOON (Read 1 times) Subj: Sort Algorithm DN> Note that bubble sort is offered by Knuth, and several others, as by DN> far the worst sorting algorithm around. The next step up is insertion DN> sort, which typically runs twice as fast. The "great all-rounder" is DN> Shell's algorithm. The "formula 1 racer" is Hoare's algorithm DN> (usually very fast, but is prone to breaking down). The "status DN> symbol" of sorting is Batcher's algorithm. Whenever I need to code a sort of my own (as opposed to just using qsort()) I use Comb Sort. It's reasonably fast, and it is uncomplicated and small enough that it is easy to remember. JdeBP --- FleetStreet 1.19 NR * Origin: JdeBP's point, using Squish (2:440/4.3) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00004 Date: 01/21/98 From: JONATHAN DE BOYNE POLLARD Time: 03:25pm \/To: BALOG PAL (Read 1 times) Subj: I need Standard C++ BP> OTOH some platforms are frozen. Say, Microsoft develop C++ for WIN32 BP> but left the 16 bit version as it was some 5 years ago. You can't BP> write code portable for WIN16 and WIN32 that really use C++. There BP> are no templates, no exception handling, etc in 1.52. This is neither a problem, nor a reason for a C++ Standard. It isn't a problem because Borland C++ supports templates and exceptions, and so does Watcom C++, and they both have 16-bit compilers that have all of the language features of the 32-bit compilers. So anyone choosing Microsoft C++ as their tool has only themselves to blame when it won't do this particular job. It isn't a reason for a C++ Standard because standardising a language does nothing for portability in this respect. The presence or absence of a C++ Standard is irrelevant to whether or not there exists an "up-to-date" implementation for any given machine architecture. There is no requirement that a C++ implementation be conformant. Only customer demand can force compiler vendors to adhere to a standard. That's how the standards process works. If customer demand cannot even force Microsoft to keep its 16-bit compiler in step with its 32-bit compiler right now, what hope does it have of forcing Microsoft to produce a Standard C++ implementation for Win16 when the C++ Standard is ratified ? JdeBP --- FleetStreet 1.19 NR * Origin: JdeBP's point, using Squish (2:440/4.3) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00005 Date: 01/22/98 From: JONATHAN DE BOYNE POLLARD Time: 09:35pm \/To: THOMAS HABETS (Read 1 times) Subj: converting char to string VK>> Hi, how do you convert a char to a string? TH> char ch; TH> char str[80]; TH> str[0] = ch; TH> str[1] = 0; Or, idiomatically : char ch ; char str[2] = { ch } ; JdeBP --- FleetStreet 1.19 NR * Origin: JdeBP's point, using Squish (2:440/4.3) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00006 Date: 01/22/98 From: MICHAEL RATHBURN Time: 06:26pm \/To: DALE SHIPP (Read 1 times) Subj: Re: sort algorithm Ullo Dale! Subject: [Re: sort algorithm] Hi Dale Shipp, hope you are having a nice day 14-Jan-98 19:43:00, Dale Shipp wrote to Michael Rathburn Subject: Re: sort algorithm DS> It is almost the dreaded bubble sort. Not too efficient, but DS> simple. That sounds like me :-) Thanks that helped a lot I think seeing it in black and white helped me see what was doing what. Yours sincerely, Michael Rathburn ... Hey Dale! Do you like Tag-O-Matic as much as I do? ~~~ Tag-O-Matic V.13 ! (39 Taglines) (Quoted 17%) Owned by Michael Rathburn --- Terminate 5.00/Pro * Origin: Terminate is now specially built for Internet! (2:250/124.19) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00007 Date: 01/22/98 From: MICHAEL RATHBURN Time: 06:30pm \/To: THOMAS MAEDER (Read 1 times) Subj: sort algorithm Greetings, Thomas. You were talking to Michael Rathburn about "sort algorithm" on Thu 22 Jan 1998 Hi Thomas Maeder, hope you are having a nice day 15-Jan-98 21:09:00, Thomas Maeder wrote to Michael Rathburn Subject: sort algorithm TM> This is bubble sort. You can look it up in every algorithms TM> textbook. ok Thanx. -=> Yours sincerely, Michael Rathburn <=- ... Tag-O-Matic adds auto tag-adoption to Termail and others ~~~ Tag-O-Matic V.13 ! (39 Taglines) (Quoted 31%) Owned by Michael Rathburn --- Terminate 5.00/Pro * Origin: When did you last warm yourself with a Terminate! (2:250/124.19) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00008 Date: 01/22/98 From: MICHAEL RATHBURN Time: 06:32pm \/To: THIERRY MOURE (Read 1 times) Subj: Re: sort algorithm Greetings, Thierry. You were talking to Michael Rathburn about "Re: sort algorithm" on Thu 22 Jan 1998 Hi Thierry Moure, hope you are having a nice day MR>> this is the confusing part :- TM>> I've added some comments Cheers:- I think I would of understood the sort if your comments had been added to the program -=> Yours sincerely, Michael Rathburn <=- ... Confused? You WILL be after the next episode of TAG-O-MATIC! ~~~ Tag-O-Matic V.13 ! (39 Taglines) (Quoted 29%) Owned by Michael Rathburn --- Terminate 5.00/Pro * Origin: With Terminate YOU can beat the feeling! (2:250/124.19) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00009 Date: 01/22/98 From: MICHAEL RATHBURN Time: 08:15pm \/To: JARI LAAKSONEN (Read 1 times) Subj: winexec() Hi jari laaksonen, hope you are having a nice day 17-Jan-98 20:58:41, jari laaksonen wrote to Michael Rathburn Subject: winexec() MR>> Is there any way I can pass WinExec a file pointer so that pbrush MR>> executes with a specific file loaded ? jl> Use ShellExecute(); I Have tried ShellExecute(); But is comes up with an error, I have also looked for some help on it but can't seem to find any ?. Do I need to include a specific header file to use it ?. what type and how many arguments do you pass to it ?. Thanx for your help. --- Terminate 5.00/Pro * Origin: Terminate & ISDN CAPI = 1000k/minute (15000 CPS) (2:250/124.19) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1T00010 Date: 01/23/98 From: THOMAS MAEDER Time: 06:38pm \/To: ROBERT DAVIES (Read 1 times) Subj: I do not under srand this RD> Does 1.e3 mean one multiplied by a thousand, Yes. It means 1 * 10^3. RD> and 1.e-3 mean one multiplied by minus a thousand? No, it means 1 * 10^(-3), or in other words 1 divided by a thousand. Thomas --- MM 1.0 #0113 IF YOU GET PAST THE DOG, YOU *AND* THE DOG ARE IN TROUBLE --- PCBoard (R) v15.22/M 25 * Origin: McMeier & Son BBS (2:301/138) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1U00000 Date: 01/24/98 From: DALE SHIPP Time: 01:25pm \/To: DAVID NOON (Read 1 times) Subj: Re: Sort Algorithm -=> On 01-21-98 19:43, David Noon <=- -=> spoke to Dale Shipp about Re: Sort Algorithm <=- DN> I would normally reply to this via Netmail, but there might be others DN> who poll this echo who have the same question; so, I'll answer it here. DN> The PGMRS echo is currently UK-only. Thus, you cannot get it in zone 1 DN> ... yet ... DN> The moderator, Simon Avery, has been trying to get a trans-Atlantic DN> link established for the echo. Since you are in MD, you might like to Do you (or Simon) have an email address we could use to talk about it? Mine is below. Not sure how much I could do to help, but am interested. dale (at) min (dot) net (1:261/1466) ... Shipwrecked on Hesperus in Columbia, Maryland. 13:27:35 24 Jan 98 ___ Blue Wave/DOS v2.30 --- Maximus/2 3.01 * Origin: Owl's Anchor (1:261/1466) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1U00001 Date: 01/23/98 From: CAMERON CLARK Time: 02:44pm \/To: CHRISTIAN FELDE (Read 1 times) Subj: Re: This work's, but... CF> char array[2][10]; CF> CF> cout << "Enter array 1: "; CF> cin >> array[1]; CF> CF> cout << "Enter array 2: "; CF> cin >> array[2]; In c/c++ all arrays are zero indexed: This means you have to start counting at zero; cin >> array[0]; cin >> array[1];* --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)