--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2H00003 Date: 02/03/98 From: JAN BIJSTERBOSCH Time: 07:38pm \/To: ADAM MAJER (Read 2 times) Subj: Darn Templates Hello Adam, 31 Jan 98, Adam Majer of 1:348/203 wrote to All AM> Could anyone explain those darn templates to me? I just AM> started to learn them and I got confused right at the start. AM> Could anyone tell me what is wrong with the following: AM> template AM> class _EXPORT TLinkedList (_EXPORT just expands to AM> _export in a DLL AM> and huge otherwise Hmm, I'm not familiar with the _EXPORT directive but I would leave it out for the moment since I'm not shure templates can be incorporated in DLL's AM> { AM> private: AM> TLinkedList *prev; AM> TLinkedList *next; AM> T *Struct; AM> public: AM> TLinkedList(){prev=NULL;next=NULL;Struct = new T}; AM> ~TLinkedList(); AM> BOOL Add(); AM> void Assign(T *s){hmemcpy(Struct,s,sizeof(T));}; AM> T* GetStruct(){return Struct;}; AM> TLinkedList *Next(){return next;}; AM> TLinkedList *Prev(){return prev;}; AM> }; AM> Then when I try to use that class I get more errors: What more errors? Where did the above give you any errors? AM> class Boo AM> { AM> .... AM> TLinkedList *List; <- invalid use of tamplate AM> !?!?! AM> }; The above is an obvious mistake. You declared an instance of the template, but you didn't tell the compiler what type of variable the template must be for. You should have typed something like: TLinkedList *List; AM> Everything compiles right in the template but I get whole AM> bunch of errors and I try to use it (template). I wanted the AM> T (the in the template class) to point to a structure AM> which is later called from another class. Hmm, I'm not shure what you exactly mean by called from another class, but it would be no problem to make class Boo a template class too. e.g.: template class Boo { .... TLinkedList *List; .... }; and somewhere in you program you could use: Boo testcase; AM> Any kind of help will be very appreciated. Thanx in AM> advance... I hope this brought some light to the subject. ;-)) Greetings from sunny Amsterdam, Jan email:bijster@worldonline.nl http://www.worldonline.nl/~bijster --- MBM v3.41e * Origin: Snuffelaar bij DosBoss West (2:500/121.5122) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2H00004 Date: 02/10/98 From: AUKE REITSMA Time: 09:18pm \/To: ROGER SCUDDER (Read 2 times) Subj: Not so sloppy after all Hi Roger, On 09 Feb 98, 12:10, you wrote to Peter Garner RS> ... I seem to need to examine each RS> thing that I have learned about procedural programming and apply RS> it to C++ to find out what is different.... what works and what RS> does not. And even if it works it is not necessarily the best, or even correct, thing to do ... PG>> "The C++ Programming Language", 1997, pp. 366 - 7. PG>> by Bjarne Stroustrup Hm? 199_7_ ? Third edition? I have a 1992 reprint (with corrections) of the second edition of 1991 ... RS> I am thinking that I should really have a copy of said text. RS> Would you consider it to be indispensable to the student of C++? I'd say so ... though my version is probably outdated (again) ... Greetings from _____ /_|__| Auke Reitsma, Delft, The Netherlands. / | \ -------------------------------------- --- GEcho 1.00 * Origin: Home by the C (Auke.Reitsma@net.hcc.nl) (2:281/400.20) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2H00005 Date: 02/11/98 From: THOMAS HABETS Time: 07:33pm \/To: MIKE LUTHER (Read 2 times) Subj: Help with multi-dim chara >> TH: char K[256][100]; ML> Which works fine in WATCOM C++ in MAIN... Uh, why are you going on and on with watcom? Gcc is _THE_ C/C++ compiler. ML> until... ML> You try to do the loop in a FUNCTION... What? Like this? void Foo(char **bar) { int c; for (c = 0; c < 2; c ++) cin >> bar[c]; } Is something wrong with that? (when bar is allocated properly ofcourse) --- * Origin: Recursive, adj.; see Recursive (2:201/293.22) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2H00006 Date: 02/10/98 From: STEVE MCCAULEY Time: 03:28pm \/To: ALL (Read 2 times) Subj: Time/Date res/ctl Hi, does anybody know of any resources/controls for dealing with time and date variables on a dialog box (BC4). Borland used to have a software repository somewhere but I've lost the address... any ideas? thanks in advance for any help, Steve. --- * Origin: Melbourne PC User Group BBS (3:632/309) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2H00007 Date: 02/10/98 From: FRANK ADAM Time: 04:39am \/To: BOB STOUT (Read 2 times) Subj: C_PlusPlus elections results to date On Feb 05 10:01, 1998, Bob Stout of 1:106/2000.6 wrote: G'day Bob, >> To be Frank, we should do it. To be anybody else, we shouldn't. :-) BS> Or, to paraphrase Rhett Butler, "Frankly, no one else gives a BS> damn..." Whoa, a certain majority once voted for Ronald Reagan as well..:-) FIDO etiquette has obviously been forgotten in this thread. ;-/ Regards, Frank. Email: fadam@sensation.net.au. --- Msged 4.20 beta 4 * Origin: The ticking point, Melbourne, Australia. (3:635/728.21@fidonet) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2H00008 Date: 02/11/98 From: NEIL HELLER Time: 09:26pm \/To: BOB STOUT (Read 2 times) Subj: CALLING DOS COMMANDS BS> Yes, but the portability is mostly an illusion in this case. Since BS> Unix is a multitasking operating system, exec() is most commonly BS> used with fork(), another Posix.1 function. DOS/Win16 have no BS> equivalents to fork() and, IIRC, even Win32 has no directly portable BS> fork() function. Just a simple question: What exactly IS fork() and why haven't you (or anybody else) mentioned spawn() and the related family of functions (including spawno by Ralph Whathisname)? * KWQ/2 1.2i * --- FLAME v1.1 * Origin: Port Chicago's Loading Dock - 510-676-5359 (1:161/204) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00000 Date: 02/12/98 From: TIM HUTZLER Time: 07:14pm \/To: DARIN MCBRIDE (Read 3 times) Subj: Re: Any Borland C++ 5 us TH>Anyone have Borland 5.02 installed? They said a typical TH>instalation was 170Mb. I thought that was fat enough. I hit TH>300Meg! This is way beyond fatware. I had to drop the 16-bit TH>Windows libraries so I could load it onto the system. DM>You have a big hard drive, don't you. It's all relative. It was *big* a few years ago. Nowadays, 1GB drives are considered bare minimum. DM>There is only 170 meg of data there, but it can easily take up 300 DM>meg on a FAT drive. You mean a FAT16. Which is my problem, I know. I loaded to a compressed volume. I think the disk usage is computed a bit differently than normal. The expanded sized are calculated based on the estimated compression ratios. That way the actual storage requirements are not exceeded. DM>Convert to NTFS ... meaning convert to NT. No thank you. It is a poor performer for most of the apps that I use. And, the extra expense I don't need. TH>Who had developed any W95 apps? DM>Been there - switched to OS/2. That's a big market... [grin] --- Maximus/2 3.01 * Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00001 Date: 02/12/98 From: TIM HUTZLER Time: 07:15pm \/To: AUKE REITSMA (Read 3 times) Subj: Re: Any Borland C++ 5 us TH>Anyone have Borland 5.02 installed? They said a typical AR>Yep. A few days ago that would have been nope ;-) Have fun. I returned it. It's a nice package, but I don't need my disk space dominated with this kind of FATware. TH>instalation was 170Mb. I thought that was fat enough. I hit TH>300Meg! This is way beyond fatware. I had to drop the 16-bit AR>That's TYPICAL not FULL ;-) AR>That's reasonable for a FULL install. Hopefully you use AR>FAT32 or your cluster size cause a 'loss' of a few 100 meg AR>more ... Don't have FAT32. I bought an early vers of Win95 before they switched. I don't know if any service pack has it, but I'm not risking headaches trying to update. TH>Also, when I compile for DOS, the DOS app runs *slow*. It is not TH>like Borlands 3.0 compiler. AR>Actually I haven't used it yet for DOS ... TH>Who had developed any W95 apps? AR>Trying and failing ... Good luck with it, and best regards... --- Maximus/2 3.01 * Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00002 Date: 02/12/98 From: TIM HUTZLER Time: 07:15pm \/To: MATHIEU BOUCHARD (Read 3 times) Subj: Re: sending AT commands TH>Thanks, I tried that out. But I get a linker error. TH>I am compiling for DOS. I am using Borland 3.0 for DOS. TH>What I would like to see is a simple application demonstrating a TH>functional, working example of manipulating the modem. I only need to TH>send AT-dialing commands to automate banking transactions and such. MB>Though the error is not related to what i'm saying, consider using MB>a Fossil driver. I only want to send dialing commands... MB>sing a library is not as stable as using a driver, WHat library?!? I resently came to the conclusion that I don't have the object file, apparently. I can no longer compile any 'stream' related functions, ie. 'getline', 'istream', 'ostream', etc. Bummer! MB>Another solution, which is probably the best suited to your particular MB>problem: If you're using a telecom package such as Telix or Terminate, MB>there's an embedded script language. Telix's SALT looks like a MB>simplified C; Terminate's language looks like a blend of pascal, MB>basic, and C. I couldn't give more details, because i don't remember MB>much of it. That's a good suggestion, I've used their scripting quite a bit. However, I want to stick to C++, because that is part of my current education. I am taking my third semester of C++ now. --- Maximus/2 3.01 * Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88)