--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00002 Date: 10/24/97 From: TOM TORFS Time: 10:30am \/To: VADIM RYZHANKOV (Read 2 times) Subj: Turbo C Vadim Ryzhankov wrote in a message to Steven Lei: JE>> puts("You have Just been Stung\n"); VR> ^^^^ It is a Turbo C Nopes, it's ANSI C :-) greetz, Tom tomtorfs@mail.dma.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00003 Date: 10/27/97 From: STEVEN LEI Time: 06:42pm \/To: PAUL WANKADIA (Read 2 times) Subj: Prototyping While Steven was reading other messages, Paul Wankadia wrote: Well... I kinda know just about all you've said already... because I've already learned them... but my teacher's about to teach them to us now... :) Now is the time to "open" and "close" files... :) Steven Lei From: Las Vegas, Nevada, USA E-mail = SpewMuffin@Juno.Com ... Isn't Physics fun! ___ Blue Wave/DOS v2.30 [NR] --- PCBoard (R) v15.21/M 2 * Origin: The Board running PCBoard 15.21 (702) 221-0083 (1:209/222) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00004 Date: 10/27/97 From: STEVEN LEI Time: 06:42pm \/To: VADIM RYZHANKOV (Read 2 times) Subj: Turbo C While Steven was reading other messages, Vadim Ryzhankov wrote: SL> That, I don't know... never used sleep before... would it be under SL> dos.h or stdlib.h? VR> ^^^^^ It is under dos.h such as "delay (unsigned)". dos.h? Kinda figures it would have been there... :) Oh, one thing... what command would you use to "close" a ASCII text file after you're finished writing to it? SL> From: Las Vegas, Nevada, USA VR> ^^^^^^^^^^^^^^^^^^^^^^ Well! I am from Ukraine. Steven Lei From: Las Vegas, Nevada, USA E-mail = SpewMuffin@Juno.Com ... Friends are family you choose yourself. ___ Blue Wave/DOS v2.30 [NR] --- PCBoard (R) v15.21/M 2 * Origin: The Board running PCBoard 15.21 (702) 221-0083 (1:209/222) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00005 Date: 10/27/97 From: STEVEN LEI Time: 06:42pm \/To: THOMAS MAEDER (Read 2 times) Subj: for() While Steven was reading other messages, Thomas Maeder wrote: TM> I don't think that you can declare variables of different types like TM> this. I thought I remembered doing something like that before... but I might be wrong... If not, just declare before the loop. Steven Lei From: Las Vegas, Nevada, USA E-mail = SpewMuffin@Juno.Com ... I don't suffer from insanity, I enjoy every minute of it. ___ Blue Wave/DOS v2.30 [NR] --- PCBoard (R) v15.21/M 2 * Origin: The Board running PCBoard 15.21 (702) 221-0083 (1:209/222) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00006 Date: 10/27/97 From: CAMERON CLARK Time: 03:58pm \/To: E. H. (Read 2 times) Subj: Re: image decoding EH> How do you decode pictures in jpeg format in c++ ? Look for the IJG's free source code on the web. --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00007 Date: 10/28/97 From: PAUL WANKADIA Time: 08:58pm \/To: JERRY COFFIN (Read 2 times) Subj: Goldilocks and the Three Pointers Goldilocks and the Three Pointers Once upon a time there were 3 pointers. The Papa pointer pointed to a big array. The Mama pointer pointed to a double precision floating-point. And the Baby pointer pointed to a little integer. One day they all entered a function, and a little lost pointer named Goldilocks entered their house (affectionately known as main()). Goldilocks was hungry so she called strcpy() to copy Papa's array into herself. Her calls to malloc() slowed the main program to a near standstill, but Goldie didn't care. She then went for Mama's double precision floating-point. But before she could get Baby's integer, the three pointers came back, and they were so angry at Goldie's thievery that they caused a run-time error and the whole house caved in. The above actually happened. I'm not kidding. Really. In other words: OH MY GOD MY PROGRAM CRASHED AGAIN, IT WAS DUE THIS MORNING AND IT DOESN'T WORK! I HATE C. I NEVER WANT TO SEE ANOTHER POINTER AS LONG AS I LIVE. DOWN WITH KERNIGHAN AND RITCHIE! --Tina "no, I'm not stressed...really" M. P.S. After I wrote this I got the %&^%*$ program to work. I think it wanted to spite me. --- PPoint 2.00 * Origin: Junyer's Workshop (1:342/1022.2) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00008 Date: 10/25/97 From: RORY STREET Time: 10:47am \/To: CAMERON CLARK (Read 2 times) Subj: Re: Java++ In a message of <16.10.97>, Cameron Clark (1:3811/350) writes: RS>> GW> Note that it is Visual J++, which is _not_ Java according to RS>> Sun. GW> Which is why Sun have initiated a lawsuit against Microsoft RS>> over CC> the RS>> GW> matter. RS>> Keep me up to date on what happends and thanks.. CC> Unlike C++ (poor attempt to relate post to topic), Java is not an CC> open standard. This means that only Sun has a say so when it comes CC> to additions and alterations of the language. :) Okay and with Java can this only be run under Unix as done with GNU C or can you run it under any OS that takes it? CC> MS has add a _clearly_ non-platform dependant syntax to the CC> language. Using /** */ comment, it allows for DLL's to be included CC> and their functions to be called. That can't be to bad? CC> C++ suffers from vague interpretations of the standard, and a slue CC> of different packages 'standard' to only certain operating systems. CC> I would hate to see Java follow the same pitfalls as C++. I know I think JAVA should have put a claus in the contract that companies that change the standard are liable to be sued and banned from developing .. Cya! Rory Street --- IOS-Mail 0.91pl9 eta * Origin: >>>> Athena BBS +44-(0)-1959-563-968 (2:440/226@fidonet.org) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEX00009 Date: 10/25/97 From: MICHAEL RATHBURN Time: 04:52pm \/To: CHRIS DOWNS (Read 2 times) Subj: Re: Help Please Hi Chris Downs, hope you are having a nice day 22-Oct-97 06:49:10, Chris Downs wrote to Michael Rathburn Subject: Re: Help Please MR>> Please if you have time please look at this code and tell me what MR>> is going wrong all it is supposed to do is get the user to enter MR>> the quoted char,int and float check they have input the correct MR>> data then output the data but the float check cocks up please MR>> tell me why. CD> FASCINATING!! CD> First off, there were some problems with the logic of the program. CD> You didn't use braces around some of the else deals so that CD> program control didn't flow as I suppose you expected. But that's CD> not what was so interesting. MR>> float pi; MR>> cout << "\n\tPlease enter pi ie:-3.142 "; cin >> pi; if(pi < MR>> 3.142 || pi > 3.142 ) { cout << "\n\tWrong Formula"; continue; } CD> When I ran this thing, I would type in 3.142 and the program CD> thinks that pi is either less than 3.142 or greater than 3.142. This is what I didn't understand I changed it to cover a range and it worked ill paste in the revised code ----> snip>< //******************************************************************* //* chap2x3.cpp //* Programmer: Michael Rathburn //* Date 24/10/97 //* Version 2 //******************************************************************* #include #include #include #include char ch; int number; float pi; void main() { clrscr(); while (1) { cout << "\n\tPlease enter the letter A "; cin >> ch; if (ch != 'A') //if not "A" print error { cout << "\n\tWrong Letter"; continue; } else cout << "\n\tPlease enter 21 "; cin >> number; if (number != 21) //if not 21 print error { cout << "\n\tWrong Integer"; continue; } else cout << "\n\tPlease enter pi ie:-3.142 "; cin >>pi; if( pi > 3.143 || pi < 3.141 ) //use a range to to test the float { cout << "\n\tWrong Formula"; continue; } else cout << "\n\tYou entered the letter " << ch; cout << "\n\tYou entered the number " << number; cout << setiosflags(ios::fixed) << setiosflags(ios::showpoint) //show decimal point << setprecision(3) //3 points after the decimal << setw(5); // set the field width to five cout << "\n\tYou Entered pi " << pi; break; } cout <<"\n\n\n\n\t\tGoodbye!"; } */ CD> There are two ways to make it work right. One is to declare pi to CD> be a double. The other is to cast your numeric constants to CD> floats. CD> So the following will (consistently?) work CD> if (pi < 3.142f || pi > (float)3.142) { ... } CD> I would love to hear a good explanation as to why 3.142(double) != CD> 3.142(float) CD> -!- Blue Wave/QWK v2.12 CD> --- Blue Wave/QWK v2.12 -=> Yours sincerely, Michael Rathburn <=- --- Terminate 5.00 UnReg * Origin: Terminate IS the final terminal! (2:250/124.19) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEY00000 Date: 10/28/97 From: DAVE LEWIS Time: 11:10pm \/To: ALL (Read 2 times) Subj: Borland C++ 4.5 I'm new to C++ and I have just purchased version 4.5 and I have some oblems. 1-If I go to the upper left corner of the output window and right click I am not able to chose to print the window. I know you can in 4.52. (which I use at school) 2-If I have a program that outputs more than 24 lines or so it seems to overflow the output buffer and I can't scroll back to see the beginning. Also a problem that is not visible at school on version 4.52. I have tried copping a working version of 4.52 and it has the same problem as 4.5 unlike the 4.52 version that I use at school. So I'm assuming it is in an installed dll file or maybe in teh registry. (yes I'm running windows95). I've also run the three patches off Borland's web age that are for 4.5 HELP PLEASE Thanks in advance Dave --- Renegade v5-11 Exp * Origin: Cranial Disturbance (613)723-9841 (1:163/572) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EEY00001 Date: 10/28/97 From: E. H. Time: 11:16pm \/To: CAMERON CLARK (Read 2 times) Subj: Re: image decoding EH> How do you decode pictures in jpeg format in c++ ? CC> CC> Look for the IJG's free source code on the web. Thanks --- Renegade v5-11 Exp * Origin: Cranial Disturbance (613)723-9841 (1:163/572)