--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00016 Date: 03/23/98 From: DAVID NOON Time: 08:07pm \/To: MATHIEU BOUCHARD (Read 3 times) Subj: Sort Algorithm In a message dated 03-20-98, Mathieu Bouchard said to Jonathan de Boyne Pollard about Sort Algorithm Hi Mathieu, JdBP> set of combs with progressively finer teeth. [snip] MB>Except that this is with sorts, monolithic sorts vs. divide-and-conquer MB>sorts. It brings some freshness into the monolithic sorts camp. It isn't that fresh. The idea was originally published by Donald Shell about 35 years ago. The code for the Shellsort algorithm I posted uses the same idea as Combsort, but applied to insertion sort instead of bubble sort. Shellsort should run a little faster than Combsort. I use Shellsort as my default sorting algorithm. Since it performs respectably on any data stream, I call it the "Swiss army knife" of sort algorithms. Regards Dave ___ * MR/2 2.25 #353 * Windows, icons, mouse and pointer = WIMP --- Maximus/2 3.01 * Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00017 Date: 03/24/98 From: JOHN RICHARDSON Time: 08:40am \/To: MICHAEL MCGAVIN (Read 3 times) Subj: passing by reference Hi Michael, I should say that I have rejected C++ as offering me any benefit over standard C. > Is it just me who's having a hell of a time thinking this through or is > this some sort of exception in the design of the language whereby a '&' > character can be used to get the compiler to automagically work out all > the pointer stuff? :-] The idea of this is just to make the code look cleaner. AFAICS, it has no value except aesthetic. eg. int funca( int &x) { x = 2; return(0); } is exactly equivalent to: int funcb( int *x) { *x = 2; return(0); } It also makes calling the function look nicer too: funca( var); funcb( &var); John. --- JetMail 0.99beta23 * Origin: The Dysfunctional Refrigerator (fidonet 2:2502/60) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00018 Date: 03/26/98 From: MATHIEU BOUCHARD Time: 09:03pm \/To: PAUL ROBINSON (Read 3 times) Subj: compiler PR> does anyone know of a good c++ compiler? PR> most of the ones i can get are.... not the best... GNU C++ 2.8.2 is the latest i think i have 2.7.2.0 matju --- Terminate 4.00/Pro * Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00019 Date: 03/26/98 From: MATHIEU BOUCHARD Time: 09:05pm \/To: TIMO FINNIL (Read 3 times) Subj: Sorting linked list TF> Help me please, i got a big problem %-) TF> How do i (quick)sort linked lists? The easiest way is to create an array of the same length, put the pointers to it in an array, sort the pointers, and recreate the list. it's probably the fastest too. Inserting an element in a linked list, however, is very fast. what's not is seeking the insertion point in that list. :-) if you have for example a text editor and want to insert at line 17567 out of 43142, use B-Trees (I think that's how they're called). matju --- Terminate 4.00/Pro * Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00020 Date: 03/26/98 From: MATHIEU BOUCHARD Time: 09:15pm \/To: HERMAN SCHONFELD (Read 3 times) Subj: VESATEST.CPP 2/3 HS> It's best if you can conceptualize 8bit modes before you start jumping HS> into HS> 15/16/24/32bit modes. The concept of just finding the screen offset and HS> assigning a colour fails in the hi-colour modes. Hey. How come? I've got some experience in low-level graphics and that's not what i've seen. matju --- Terminate 4.00/Pro * Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00021 Date: 03/26/98 From: MATHIEU BOUCHARD Time: 09:17pm \/To: DARIN MCBRIDE (Read 3 times) Subj: Sorting linked list TF>> Help me please, i got a big problem %-) TF>> How do i (quick)sort linked lists? DM> Quick sort requires random access which lists don't have. One method may DM> be insertion sort if you can move from one list to another. I don't know what your quicksort is, but mine doesn't require random access. I would still use an array version instead of a list version cause i'm lazy, however, i can write a linked list version that won't be *that* slow (i mean, it won't be anymore than O(n log n)). Write your quicksort algorithm and i'll see why it can't be applied to lists... matju --- Terminate 4.00/Pro * Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00022 Date: 03/25/98 From: RICHARD HIRNER Time: 10:43pm \/To: JARED MORGAN (Read 3 times) Subj: Changing Win 3.11 Hallo! JM> @MSGID: 1:129/230 350fc34f JM> *** Quoting Richard Hirner to Jared Morgan dated 03-15-98 *** > Hello! > > 07 Mar 98 12:42:20: Jared Morgan -> All, "Changing Win 3.11" > > JM> Is there a way to use Turbo C++ to "modify" Win 3.11 programs > JM> to work in win 95? > > I can't imagine. But why to do so? Win95 runs (almost) all > Win 3.11 programs correctly. > > Richard > JM> *** JM> I have PC tools for windows central point desktop 2.0 JM> I have several programs I would like to use in win95 JM> such as multi-desktops etc. I learned it "WAS" possable JM> to do so, I also would like to know how to increase the JM> colors (when I raise the resoultion then add a new icon JM> the color is off and/or doesn't show) JM> maybe you could help. If it doesn't run correctly, I would run the program "C:\WINDOWS\SYSTEM\MKCOMPAT.EXE". It can provide much more compatibility to old Windows programs. Richard ... Wave to your neighbor, Word to your mother. --- Blue Wave v2.05 [NR] * Origin: Constants aren't (2:310/3) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00023 Date: 03/26/98 From: RICHARD HIRNER Time: 07:06pm \/To: JONATHAN DE BOYNE POLLARD (Read 3 times) Subj: Loading EXEs into RAM Hallo! 17 Mar 98 11:35:44: Jonathan de Boyne Pollard -> Richard Hirner, "Loading EXEs into RAM" RH> I am going to write a 16-bit protected mode program with Borland C++ RH> *3.1*. All I need from you is to know how to load an EXE program into RH> the memory (protected mode!). JdBP> Let the operating system worry about that. I wrote 16-bit OS/2 1.x JdBP> programs using Borland C++ 3.1 for DOS several years ago, and all of JdBP> the hassle of loading the EXE into memory was dealt with by the JdBP> operating system, and wasn't my concern. JdBP> If you are targetting a non-protected mode operating system, like DOS, JdBP> then let your DOS extender worry about loading the EXE. It will stick JdBP> a stub program on the front of your executable (TLINK can generate NE JdBP> format executables, if memory serves) which will deal with loading JdBP> your program into memory and switching into protected mode. JdBP> If you aren't using a DOS extender, then you have more worries than JdBP> can be dealt with in even a month of echomail messages. I don't use any kind of extender, I just want to make a DOS-program that's task is to switch to 32-bit-protected-mode (I've done that already). Then it should load another application into the memory and execute it by a FAR jump. Descriptor allocation and so on is no problem. So I need the information how I load a simple MZ-EXE-program into the memory. (Without using the DOS "EXECUTE" function!) That's all! There's especionally one problem: How can I find out at which EXE-offset does a new segment begin? Richard --- Blue Wave v2.05 [NR] * Origin: Constants aren't (2:310/3) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F3W00024 Date: 03/26/98 From: BOB STOUT Time: 12:11am \/To: JO GERAERTS (Read 3 times) Subj: Ansi files On , Jo Geraerts (2:292/120.121@fidonet) wrote: > How can I use ANSi files in C++. They 've got to be linked into the > executable. It's in SNIPPETS - look up ANSISYS.HPP and related files. --- QM v1.00 * Origin: MicroFirm : Down to the C in chips (1:106/2000.6) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F4200000 Date: 03/28/98 From: ROGER SCUDDER Time: 02:41am \/To: ALL (Read 3 times) Subj: Jerry Coffin * Forwarded from C_ECHO by Roger Scudder (1:273/404@fidonet). * Originally by: Roger Scudder (1:273/404@fidonet), 28 Mar 98 01:56. * Originally to: All (0/0). ---------- Forwarded message ---------- @MSGID: 1:273/404@fidonet 351c5f4b Hello All. For years Jerry Coffin was a powerful force in this echo. He always had time to help the novice, yet he had the skills to discuss deep C with the best of em'. It really bothered me when I heard that he was leaving FidoNet. I knew that the C and C++ Echoes were losing one of their finest members and that most of us were losing a great teacher. I was recently in touch with Jerry by e-mail and I'm very glad to report that he is planning to come back, possibly as soon as July. By Jerry's permission here is what he had to say when I asked him "Hey Jerry, What's up?" ...