--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00013 Date: 02/13/98 From: TIM HUTZLER Time: 10:50am \/To: ALL (Read 3 times) Subj: My Borland 3.0... My borland 3.0 lost its ability to link with any 'iostream' objects. I suspect that one or more .OBJ library files have passed onto the big Gigabyte in the sky. Of course there may be another reason for this. What object library file contains the iostream code? P.S. - Reinstalling is not possible, since the disks have gone stale over the years, and I don't have backups (which probably would have gone stale, too) [sigh] While the install operation fails, I think I can extract specific files, however. Not sure which ones, but I think most are recoverable. I just need to know which ones. ___ Blue Wave/QWK v2.12 --- Maximus/2 3.01 * Origin: Madman BBS * Chico, California * 530-893-8079 * (1:119/88) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00014 Date: 02/13/98 From: DARIN MCBRIDE Time: 08:05pm \/To: BOB STOUT (Read 3 times) Subj: CALLING DOS COMMANDS > What exactly IS fork() BS> The fork() function does pretty much what it says - Er, Bob, take a step back - what does "fork()" say? To me, it's a utensil I eat salad with. I'm just looking for a spoon() to eat soup with! To some of us who understand that it is indeed referring to a fork in a road where a road splits into two roads, fork() actually verbs this noun. Again, not exactly "what it says." It _creates_ what it says - a fork in the processes. Thankfully, the rest of your message explains much better than your opening sentence. :-) I would recommend one minor addition: you were speaking of the "general" way of creating another process. Shown as: switch(fork()) { case -1: /* error handling */ break; case 0: /* exec call: */ exit(exec(...)); default: break; } Noting, however, that true unix hacking gurus would not deign to use such (relatively) readable code... ;-) --- * Origin: Tanktalus' Tower BBS (1:250/102) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00015 Date: 02/13/98 From: ANTHONY TIBBS Time: 11:00pm \/To: JAMIE KOWINSKY (Read 3 times) Subj: Re: Bordland compiler? JK> Looking for a C++ compiler that is up to date yet still can compile JK> for DOS, Any suugestions? I was told Bordland C++ v5 would be good, JK> but I was also told itwas rather horrible for DOS. I use Borland C++ 4.52, which compilers for DOS, Win16, and Win32 (and supposedly CAN be used for DPMI???). Works great. Take care, Anthony --- Telegard v3.09.g1 * Origin: The Tibbs Point % Ottawa, ON Canada % Private, Eh! (1:163/215.38) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00016 Date: 02/09/98 From: ROGER SCUDDER Time: 04:43pm \/To: JONATHAN DE BOYNE POLLARD (Read 3 times) Subj: C++ Saveding stuff Hello Jonathan. 04 Feb 98 16:43, Jonathan de Boyne Pollard wrote to Roger Scudder: JdBP> Not up to speed with the way things now work in the Standard C++ JdBP> language? Does it show? Luckey for me I have you here to help me get it straight, huh? JdBP> Tut tut! Even in Classic C++ that snippet of code was perfectly JdBP> acceptable, and did exactly the job required. Go back to the JdBP> manuals and read up about temporary objects and destructors. I will, but wouldn't be more to the point to start learning the standard classes and their methods. It seems to me I'm completely in the dark where they are concerned. -Roger ... I am Bugs Bunny of Borg. What's up, Collective? --- Msged 4.20 beta 3 * Origin: Hodge-Podge Support BBS, Upper Darby, Pennsylvania, USA (1:273/404@fidonet) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00017 Date: 02/09/98 From: ROGER SCUDDER Time: 04:46pm \/To: JONATHAN DE BOYNE POLLARD (Read 3 times) Subj: C++ Saveding stuff Hello Jonathan. 04 Feb 98 16:17, Jonathan de Boyne Pollard wrote to Roger Scudder: JdBP> I hope that in ruling on the topicality the moderator bears in mind that JdBP> fgets() is a function in the Standard C++ library, defined (albeit by JdBP> reference to ISO IEC 9899) in section 27.8.2 of the C++ Standard. Oh, I'm sure he'll slide us a little slack on that. I think you can safely stop worrying about it. ;-) -Roger ... If you're straight, don't say "Kiss my butt" to a gay person. --- Msged 4.20 beta 3 * Origin: Hodge-Podge Support BBS, Upper Darby, Pennsylvania, USA (1:273/404@fidonet) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00018 Date: 02/09/98 From: ROGER SCUDDER Time: 04:47pm \/To: DARIN MCBRIDE (Read 3 times) Subj: C++ Saveding stuff Hello Darin. 07 Feb 98 12:00, Darin McBride wrote to Roger Scudder: RS>>> TM> if (name=="Cyber Con") RS>>> That doesn't work. You're comparing addresses. Use strcmp. TM>> No. I call an overloaded operator==(). RS>> And you expect a complete novice to understand that without RS>> even a comment? I assumed that this would be your response, RS>> but I think you should provide the code for the overloaded RS>> operator if you are going to present such an advanced OO RS>> technique to a novice. DM> Not really - this is standard C++ style. And one of the things that make DM> it difficult for C programmers to make the switch to C++. Yes, teaching DM> someone C++ should tell them what is going on in the background, but if I DM> was to post working code as a snippet, it shouldn't need that as long as DM> name was declared "string name" rather than "char* name". Well, I still would have liked to see a little explanation as to what was going on. If I see something that doesn't look right to me, I just going to blast about it. It worked great this time. It occurs to me that trying to tell someone they are wrong when they are right is great way to get lots of information on the subject. Here's something I'm not clear about... #include int main( void ) { ifstream source ("infile"); if(!source) blablabla... When is the file opened in that snip? Is the reason this works the same as why the next line works? RS>>> TM> ofstream("file1.fil") << name; Because the filename is hard coded? In other examples I have been looking at where the filename must be supplyed by the user at runtime the files are opened using this syntax... ifstream infile; infile.open( argv[1]. ios::in ) Can you give me a few words about how this works? DM> It is done explicitly - by the ofstream's destructor. That's the power of DM> classes - they automatically allocate/deallocate things for you. The It sounds very good indeed! DM> Trust me - when you start putting reference-counting objects that point to DM> hierarchies of class types into containers, you will have a hard time DM> knowing when to close that file - let the destructor do it for you. You DM> will get cleaner code, and be less likely to have a memory/resource leak. DM> Been there, done that. OK. I trust you.... well, as far as coding is concerned. ;-) Actually that makes a lot of sense to me and helps to tie together some of the reading I have been doing. RS>> Here's the errors I get when I try to compile your code. DM> Note that "string" is standard, but not implemented standardly everywhere. DM> That is most likely your problem. Try a "more up to date" compiler (gcc?). Well, I tried it with BC++ 3.1 and it's looking more and more like a C compiler all the time. I'll stick to MSVC 5 from now on. That way if I work in the Visual Studio I'll have all the references right there. In fact I'm going to take some time to read through the docs about the string and io classes. -Roger ... I am Magnus Magnuson of Borg. Your score is irrelevant. --- Msged 4.20 beta 3 * Origin: Hodge-Podge Support BBS, Upper Darby, Pennsylvania, USA (1:273/404@fidonet) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00019 Date: 02/13/98 From: PETER GARNER Time: 01:07am \/To: BRIAN LUNERGAN (Read 3 times) Subj: Rookie seeks help with a BL> BL> There's an old expression attributed to BP about expecting and BL> getting the best out the scouts. "When in doubt, hand the kid the BL> end with the jam on it." Who is BP and what the hell does that expression mean? BL> I think I have the mechanics of reading in the file worked out and BL> then writing it back to the same file (although I wouldn't mind BL> learning from a few code snippets how others have dealt with this BL> problem); however, I'm not sure how to handle the line by line BL> checking before writing it back to the file. Any help and ideas BL> would be greatly appreciated. Well, I think you will get numerous responses, but here is one... This assumes that we are invoking the program by redirecting the input and the output from the command line, i.e. we will run this as : progname < infilename > outfilename This gives us the advantage of being able to test this program with the console without having to create test files if we want. BTW do you understand redirection, etc? Also since you didn't say what the unwanted text is, we have to black box that one, lets assume a boolean function : bool wantLine ( const char * cszLine ) ; ============================================================= # include // If you have an ANSI compiler and do not need to define bool, // omit the next line enum bool { false = 0 , true } ; # define MAX_LINE 2047 bool wantLine ( const char * cszLine ) ; // For ease, we are assuming the program will be invoked as prog < infile > outfile int main ( int argc , const char ** argv ) { char szCurrLine [MAX_LINE + 1] ; while ( cin ) // Check for Error or End of File { cin.getline ( szCurrLine , MAX_LINE ) ; // We are again checking for an error or end of file condition // as well as whether we want the current line if ( cin && wantLine ( szCurrLine ) ) { cout << szCurrLine << endl ; } /* endif */ } /* endwhile */ } /* int main ( int argc , const char ** argv ) */ bool wantLine ( const char * cszLine ) { // Whatever testing you want goes here return true ; } /* bool wantLine ( const char * cszLine ) */ ============================================================= --- KWQ/2 1.2i ...had this been an actual emergency, we would flee in terror, a * Origin: St. Louis Users Group (1:100/4) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00020 Date: 02/13/98 From: NEIL HELLER Time: 08:10pm \/To: MATHIEU BOUCHARD (Read 3 times) Subj: CONVERTING CHAR TO JdBP> Or, idiomatically : JdBP> char ch ; JdBP> char str[2] = { ch } ; MB> does that guarantee that str[1] == 0 ? Yes. char str[10] = {'a'}; guarantees the str[1] thru str[9] are all hex zeroes. But this is C, not C++. * 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: F2K00021 Date: 02/13/98 From: ALEXANDER SEMENETS Time: 11:21pm \/To: ALL (Read 3 times) Subj: Help! ਢ , All! 砩檨 p, p. === Cut === if(event.what == evCommand) { switch(event.message.command) { ... case cmRegionCmd: // p筨 p TDialog1::TDialog1(); ^ p 뤠 Undefined symbol '{' break; ... } clearEvent(event); } } === Cut === h-䠩: === Cut === class TDialog1 : public TDialog { public: TDialog1(); TDialog1(StreamableInit) : TDialog(streamableInit), TWindowInit(&TDialog1::initFrame) {}; ... }; === Cut === cpp: === Cut === TDialog1::TDialog1() : TDialog(TRect(23, 1, 54, 22), ""), TWindowInit(&TDialog1::initFrame) { TView *control; this->helpCtx = hcListBox1; control = new TListBox(TRect(1, 1, 29, 20), 1, 0); insert(control); control = new TScrollBar(TRect(29, 1, 30, 20)); insert(control); selectNext(False); } === Cut === 祬 ? p BC 3.1 TVision. 쭮 - p ppp C. C++ ⮫쪮 ᢠ. p 祭 p⥫ . Alexander 13 䥢 1998. () 23:21 --- * Origin: YOOHOO 뫪 p! (FidoNet 2:4613/204.213) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F2K00022 Date: 02/12/98 From: BOB STOUT Time: 10:50pm \/To: FRANK ADAM (Read 3 times) Subj: C_PlusPlus elections results to date On , Frank Adam (3:635/728.21@fidonet) wrote: >> To be Frank, we should do it. To be anybody else, we shouldn't. :-) RS> Or, to paraphrase Rhett Butler, "Frankly, no one else gives a damn..." > Whoa, a certain majority once voted for Ronald Reagan as well..:-) > FIDO etiquette has obviously been forgotten in this thread. ;-/ Frank... It was just a continuing play on the word, "frank" in its various connotations - nothing else was meant nor should be implied. Sorry if you found it offensive. --- QM v1.00 * Origin: MicroFirm : Down to the C in chips (1:106/2000.6)