--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00001 Date: 07/14/97 From: JANI SAKSA Time: 11:18pm \/To: JOHN HENDRICKS (Read 3 times) Subj: Re: -=> Propably John Hendricks wrote to All <=- Hello John! JH> Hi all. I'm wanting to learn to program C and I dont realy know where JH> to start, I've downloaded a couple of tutorials, but their written in JH> C! What would be best to start in, C or Pascal? I've heard that C is JH> more easy to use than pascal and that it's more flexible, also it's JH> not based as much on mathematics as Pascal (he was a greek JH> mathematician,right?), anyhow, can anybody help? C is easyer to use, when making hard programs, but maybe you should _first_ learn Pascal. After that C will be easy. I can't see that Pascal is based on mathematics. Pascal was first made to teach programming. Pascal is very easy, because the code is so easy to read, but you can do some code better with C. Good luck. // // Sir Robin (jsaksa79@hotmail.com) // http://www.cedunet.com/~jsaksa/ // Gamerz Starting Page - Page made for _all_ computer gamers! // --- BBBS/2 v3.33 How-C * Origin: Cat-Box - 02-4841086 (2:222/120) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00002 Date: 07/14/97 From: JANI SAKSA Time: 11:19pm \/To: STEVEN DYCK (Read 3 times) Subj: Re: pictures and sound -=> Propably Steven Dyck wrote to All <=- Hello Steven! SD> Being that no one has answered my question, it means one of three SD> things: no one know how, it is not possible, or I haven't waited long SD> enough. BTW, my questions were how to load a picture into a program and SD> how to play music in c++ (or c). SD> I have one question related to this. Is it just plain possible to do SD> these things? SD> Does anyone know how to just play music in c/c++? SD> Thanks for the help and attention. I'm sorry that I don't have time to tell this for you, but I can give you an advice. If you have an acces to internet then you could go to some programming place and look some info from there. There's usually a lot of info. You could use search words "C programming" (with the quotes) in altavista. Also there's this programming place: x2ftp.oulu.fi if I remember correctly, but I'm not sure is it for all programmers, C programmers or DJGPP programmers. Try it. SD> TTYL! SD> Steve // // Sir Robin (jsaksa79@hotmail.com) // http://www.cedunet.com/~jsaksa/ // Gamerz Starting Page - Page made for _all_ computer gamers! // ... Never be without your purple monkey. --- BBBS/2 v3.33 How-C * Origin: Cat-Box - 02-4841086 (2:222/120) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00003 Date: 07/15/97 From: ERIK WARMELINK Time: 03:01am \/To: CAMERON CLARK (Read 3 times) Subj: Re: Signs of numbers Cameron, 14 Jul you wrote to Bob Stout: BS> 1. It only works on two's-complement machines. The C and C++ language BS> standards have been written to allow implementation on machines using BS> other numeric representations. CC> The implementation of the language on a specific machine CC> should take care of the work for you. You should read the standard before demanding a certain implementation. CC> Saying "8000" bit for and integer assumes that an int is 32 CC> bits. This is not the case for all compilers. BC4.5 is an CC> example that limits data types depending upon the target type CC> (dos/win16/win32). That's another good reason to write negative = x < 0; CC> It would be stupid to want to test the sign of an CC> unsigned variable. Heh? An unsigned can be zero or positive, enough reason to test the sign. CC> For readability, I would have used if testing for each CC> case. Ors and Ands are for speed. If ``x && value'' would be faster than ``x < 0'' even an average compiler would produce your code if someone writes ``x < 0''. It is much harder to optimize obfuscated code like ``x & value'', if that happens to be equivalent to ``x < 0''. Bye, Erik --- * Origin: WarmelinkE@vertis.nl (2:282/1.60) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00004 Date: 07/08/97 From: NATHAN SEELEY Time: 09:42pm \/To: ALL (Read 3 times) Subj: dBASE Hello fellow programmers, :) I'm looking to find the file structures of dBASE 1.5 files. Since dBASE is the database standard, I assume this information is freely available?? (I'm hoping!) Any information would be gladly accepted. -Nathan Seeley- --- Telegard v3.02 & TGWave 1.20 * Origin: Call The Christian Soldier! *(541) 732-3002* (1:341/107) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00005 Date: 07/12/97 From: CHRISTIAN KOTZ Time: 12:31am \/To: CHRISTIAN S. PEDERSEN (Read 3 times) Subj: Deleting a Class. Hello Christian! reply to a message from Christian S. Pedersen to All: CSP> If I "delete" a Class, allocated with "new", will the Class' CSP> destructor be called ? You do not "delete" a class (this can't be done since class is a *type* ), You delete an instance of a class dynamically allocated by new. delete on a dynamic class instance does: 1st execute the destructor (+ base class destructors, most derived ones first) 2nd free the memory (either by global ::delete or if You wrote Your own YourClass::operator delete by that) bye, Christian! --- * Origin: for(;;)full()?sleep():eat(); (2:310/78.19) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00006 Date: 07/15/97 From: DARIN MCBRIDE Time: 07:23pm \/To: FRANK SWARBRICK (Read 3 times) Subj: database stuff -=> Quoting FRANK SWARBRICK to DARIN MCBRIDE DM> Now somehow I think that's rather, um, old. :-) DB2 won't even DM> upgrade from that anymore, AFAIK. FS> Well, yes, I know it's rather old. Our shop is very behind the times. If it works effeciently enough, perhaps it isn't really behind the times. FS> OS/VS COBOL, which is from the 70's, and a lot of the programs use the FS> '68 standard! Woo-hoo! I wasn't even ALIVE at that time! :-) DM> 1. SQL is a language spec, not a database (although MS likes to call DM> theirs "SQL" [as in SQLServer]). DM> 2. DB2 understands SQL, as do most major databases. However, the SQL DM> itself is not actually really used inside C (although you can embed it DM> and use a preprocessor to create valid C/C++ statements from your SQL DM> code). DM> If you get DB2, you'll get sample code in C, REXX, and others (can't DM> recall offhand). If you want more information, I'm sure I could find DM> it... FS> Yeah, I read a little about DB2 in a book at work (one of the PC FS> programmers bought it!), so I know that SQL is not a database itself. FS> And I realize that you use a preprocessor to create valid C (or FS> whatever statements). I was just wondering about the software. How FS> much does it cost? Which is the best? (Heh) Don't ask me - I'm biased. :-} Phone up your local IBM office and ask. :-} FS> BTW, at this point I have Borland C++ 3.1 and I *don't* have Windows! FS> Soon, though... DM> I don't know of anyone providing libraries for a compiler that old... DM> :-) DM> [Disclaimer: Just 'cuz I'm on the DB2 team doesn't mean I speak for DM> 'em.] FS> Were you serious or kidding about the BC++ 3.1? Can you use it with FS> DB2 or not? I'm not sure. However, I don't anticipate support of Win3.1 for much longer (although it is still supported). DOS has not been supported for a while already, AFAIK. So, I would guess that MSVC++ 5 to be supported, IBM VAC++ 3 to be supported, and possibly Borland 5 - again, I'd have to ask around, and don't actually know for sure myself. It'd be just as easy to talk to someone from IBM locally... You'd be interested in getting the DB2 SDK package - you might even be able to get the latest v5 beta to try out [although we're doing some massive install changes right now but the code itself seems pretty stable]. ... Back up my hard disk? I can't find the reverse switch! --- FastEcho 1.46 * Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00007 Date: 07/10/97 From: ANTHONY TIBBS Time: 12:51pm \/To: ALL (Read 3 times) Subj: Re: fjelfrl;fhjeo;fhew; TSM> THE RIZLA BBS IS AN OFFICIAL DISTRO SITE FOR.. Can someone not cut this idiot's access? Sincerely, Anthony Tibbs ... "Could you continue your petty bickering? I find it most intriguing." ___ Blue Wave/DOS v2.30 [NR] --- Maximus 3.01 * Origin: World of Power BBS Private Ottawa, ON (1:163/215.38) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00008 Date: 07/14/97 From: ANTHONY TIBBS Time: 10:59am \/To: ALL (Read 3 times) Subj: Gone Away * Crossposted from: C_Echo This is just to let you all know that I'll be out of the area until the 30th or so of July, and will not be able to respond to any mail. Sincerely, Anthony Tibbs ___ Blue Wave/DOS v2.30 [NR] --- Maximus 3.01 * Origin: World of Power BBS Private Ottawa, ON (1:163/215.38) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00009 Date: 07/15/97 From: KURT KUZBA Time: 11:57pm \/To: FERNANDO ARIEL GONT (Read 3 times) Subj: QUIERO APRENDER C++ FA> about writing my messages in Spanish, English is the official language of the ECHO. I hope you'll stay around. The rules will be posted again. Without seeing the text, I cannot know why he says declare and define. By declare, he may have meant prototype. A function must have a prototype, which must appear in the code prior to any calls to that function. The definition of a function may be the function itself then. If you have a file which requires a function in another file, then the other file must appear prior to it. FA> What are the "streams class" The stream classes are used to manipulate data streams, such as file I/O and I/O using stdout and stdin. FA> What does "class" mean?. Does it mean "library"? A class is a C++ concept. It is similar to a struct. It may contain private, protected, and public sections. These sections may contain code, data, or other classes. FA> What is the "<<" operator used for ? This is left shift. Given an unsigned int x = 0x0001: x << 1 // turns 0x0001 into 0x0010 x << 2 // turns 0x0001 into 0x0100 x << 3 // turns 0x0001 into 0x1000 It may also be used with an assignment operator: x <<= 1 // turns 0x0001 into 0x0010 and makes x = 0x0010 It is also commonly used with the iostream classes as an overloaded operator, which means it does whatever the class defines it to do. With cout, for example, it takes the text following the operator and sends it to the stream. FA> Aren't the "escape sequences" the ones used with the ANSI FA> driver ? Escape sequence is a generic term. ANSI.SYS uses escape sequences triggerred with "\x1b[". Strings in C++ use the \ to prefix an escape sequence. Some characters can not be reasonably coded into a string, so they are given special escape sequences. BACKSLASH = '\\' TAB = '\t' ENTER = 'r' LINE FEED = '\n' QUOTE = '\"' BACKSPACE = '\b' BELL = '\a' I hope this helps a little. :) > ] Conspiracy? There's no conspiracy. Go ahead. Ask anyone..... --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EBK00010 Date: 07/15/97 From: KURT KUZBA Time: 11:57pm \/To: BOB STOUT (Read 3 times) Subj: Signs of numbers BS> I was about to chastise you over two things BS> Still, the issue remains in C++ that such a function BS> *must* have a prototype and the prototype will be BS> different depending on the type of the operand. True. It would require a whole stable of sgn() functions. Did I forget to mention that it is so trivial a bit of code in C or C++ that you may as well just do it inline and save yourself the function call? :) It's not like in BASIC, where it would require several lines of code, after all. The real problem arises when you want to do a calculation within the conditional. This, however, is a design problem easily surmounted by the individual without the use of multiple functions. Some older C++ compilers, such as Borland 3.1, do not support templates, so that avenue, while available, is not an overall solution either. Personally, I would perform my calculations outside the ternary conditional and use a simple inline statement. If you KNEW that the macro required that the values not be used with assignment operators, then that would be a viable avenue as well, but, as you know, you can not rely on the programmer to observe such a rule. If *I* were writing the language, I believe that I would simply not include a sgn() function at all! ;) --- > ] I'm not materialistic. I'm just Object Oriented............. --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)