--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1Y00012 Date: 01/29/98 From: TOM TORFS Time: 12:23am \/To: TWIGGY (Read 1 times) Subj: Windows C++ TwiGGy wrote in a message to All: T> Does anyone know how to program in Windows with C++ T> (or just C++ for Windows) :) Basically you have three possibilities: * raw API programming (ugh...) * using a framework like MFC or OWL * using a visual design tool like Borland C++Builder If you're a beginner to Windows programming (like myself) I can definitely recommend the third option. It's drop dead easy and you quickly gain enough insight into the Windows way-to-do-things to probably be able to switch to a framework later. YMMV. BTW You may want to mention your real name somewhere in the message. No reason to hide behind an alias with a case-problem. greetings, Tom tomtorfs@village.uunet.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: F1Z00000 Date: 01/29/98 From: DARRELL HNIZDOR Time: 08:41am \/To: ALL (Read 1 times) Subj: Modem Here is my problem. I want to write program to use the modem and serial port. Using Borland c++ v5, I was unable to use the snippets header modemio.h or serial.h, wouldn't compile. When I went to help about stream class io that was no help. Help! . /s --- Platinum Xpress/Win/Wildcat5! v2.0 * Origin: Friendship Corner Albany, TX 915-762-2745 (1:392/25) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1Z00001 Date: 01/27/98 From: FRANK ADAM Time: 09:51am \/To: CHRISTIAN FELDE (Read 1 times) Subj: This work's, but... On Jan 22 17:06, 1998, Christian Felde of 2:210/30 wrote: G'day Christian, CF> char array[2][10]; cin >> array[2]; CF> Segmentation fault (core dumped) Ouch, one thing you *must* remember. When you say char array[2], you're asking for 2 elements. That means you have array[0] and array[1], but NOT array[2]. It is confusing at first, especially if you come from basic, but in time you get used to it..so they tell me. :-) 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: F1Z00002 Date: 01/27/98 From: FRANK ADAM Time: 10:07am \/To: CHRISTIAN FELDE (Read 1 times) Subj: sort.cpp On Jan 22 17:06, 1998, Christian Felde of 2:210/30 wrote: G'day Christian, CF> it, and when I try to run it, there's no output, and no input I give CF> does anything. So then I must brake it with ctrl+c to return to I've compiled this and it worked fine..both in windows and DOS mode. There is a warning on line 18, but easily fixed by wrapping i+1 in parents. cout << (i + 1) << ".: "; 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: F1Z00003 Date: 01/29/98 From: ROGER SCUDDER Time: 02:08pm \/To: DARIN MCBRIDE (Read 1 times) Subj: this 28 Jan 98 19:53, Would be Moderator, Darin McBride wrote to Roger Scudder: RS>> What is the scoop with this? BC++ 3.1 tells me it's obsolete. RS>> Is that correct? DM> Er, no. "this" is still a keyword that is a pointer to the object that DM> your member function is acting on. Hello Darin. Seems the language definition has undergone several revisions since BC++ 3.1 was released. -Roger ... tagline. --- 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: F1Z00004 Date: 01/29/98 From: THOMAS HABETS Time: 05:57pm \/To: MATHIEU BOUCHARD (Read 1 times) Subj: converting char to string TH>> char ch; TH>> char str[80]; TH>> str[0] = ch; TH>> str[1] = 0; MB> 78 bytes wasted. Ha....................ha............................ha............ --- * Origin: It works? Get out of here! (2:201/293.22) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1Z00005 Date: 01/28/98 From: MART ORUAAS Time: 09:37am \/To: ROGER SCUDDER (Read 1 times) Subj: char to string Hi Roger! 24 Jan 98, Roger Scudder klbistab klaverit >> Mart Oruaas: RS> Are you sure about the '\0' being appended? I know that RS> strncpy does not append a NUL. I thought that the behavior RS> was consistent across all the strnxxx functions. i don't know, whether all versions of strncpy() add \0 or not, but at least it's so under linux with libc 5.3.12. hmm, i just checked the strncpy man page again, and it says that result is not necessarily null-terminated. weird, considering the results of my little test program. anyway, it seems to be safer to add \0 "manually" when using strncpy(). fazz --- GEcho 1.11+ * Origin: l'Ermite (FidoNet 2:490/18) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1Z00006 Date: 01/29/98 From: GERRY DANEN Time: 08:52pm \/To: ALL (Read 1 times) Subj: Geeks & Nerds * Crossposted from: CN.NEWS: News & Announcements - ALL MUST READ You're A Nerd? Hey, Cool! By Stephen Manes, InformationWeek The few. The proud. The programmers. That military image just might be the future image of IT. Listen up, IT professionals: You're about to become sexier. Hipper. More desirable. If a recent government initiative has its way, the kind of work you do will be getting a heavy-duty promo buff-and-polish from expensive TV ads. Who knows? How about "Just Code It" with Bill Gates, body rippling and breaking a sweat while pounding out an app in Visual Basic? On second thought, make that Kim Polese and Java. Given the general lack of attractiveness of computerdom's royalty, I suspect that if this plan takes off you'll either be seeing a lot of Kim or a lot of celebrities who don't know shell sorts from Shinola. According to a study released by the Information Technology Association of America and Virginia Polytechnic Institute, approximately 10% of all IT positions-or 346,000 jobs-are going begging. To help close the gap, the Labor and Commerce departments plan to spend some $28 million to train and recruit newcomers to IT. Part of the deal is to rid the industry of what some see as an unflattering public image -- the nerd with pocket protector -- by publicizing the glories of IT. "Technology is cool, it's the future, it's exciting," proclaimed ITAA president Harris Miller in precisely the words a nerd would use while fumbling with his pocket protector. Obviously, professional help is needed, so I called in my friend Schiller, an advertising consultant. Here are a few of his ideas for a campaign that could revolutionize the way the world sees IT. The final moments of 1999: High above Times Square, the lighted ball descends to usher in the new year. As it reaches the bottom and the crowd below erupts into pandemonium, the lights go out throughout New York. Cut to Ginger Spice, one of the Spice Girls, sitting in front of her monitor, shaking her head. "Oops, look at that: One last year 2000 bug." She types in a couple of lines of code and bangs on the Enter key. Cut to the neon returning as the crowd roars its approval. Dissolve to Ginger flashing us the thumbs-up sign with a satisfied smile. "Programming," she says. "You've Got The Power." A grizzled old-timer with a pockmarked face is lit only by his monitor. He turns toward us. "Two weeks ago I was out on the street without a home, without a job, without a high-school education. Today, I'm developing operating system software for Microsoft, writing the crucial code that keeps your computer from crashing. Now I've got a good salary, stock options, all the Jolt cola I can drink, and the unmitigated arrogance that comes with 'em. If I can do it, you can, too." An announcer's voice tells where to E-mail for the free brochure. Michael Jordan sinks a game-winning 3-pointer at the buzzer, retrieves the ball, and hands the souvenir to a well-muscled fellow sitting courtside with a beautiful woman. "Who's that dude?" an opposing player asks. "My main man," says Jordan. "What? He designed your shoes?" the other player sneers. Jordan shakes his head and grins. "He designed the program that designed my shoes." The programmer shrugs modestly. His date looks at him with a mixture of pride and lust. Fade to slogan: "Software: It's Everywhere You Want To Be." Since it's crucial to "hook 'em young," expect girls to bond with toys like Talking Programmer Barbie, complete with phrases like "Isn't this little distributed object implementation just so cute?" The secret weapon for luring boys is likely to be a time-tested macho icon making a triumphant return from retirement with a name change. Hey, guys, no pushing for the T-shirt featuring that tough- guy keyboard wizard, Joe Cobol! Gerry Danen (gdanen@connect.ab.ca) C+Net BBS @ 403-477-9545 http://www.geocities.com/SiliconValley/Way/9823 Moderator STN.Y2K: Year 2000 information & discussion 1 year, 336 days, 3 hours, 13 minutes, and 4 seconds until January 1, 2000. ... Happiness: A modem, a rainy day and e-mail friends. --- Maximus 3.01 * Origin: C+Net BBS. Programming & Networking. (1:342/601) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1^00000 Date: 01/29/98 From: ANTHONY TIBBS Time: 05:34pm \/To: MANISH MALIK (Read 1 times) Subj: C++ Saveding stuff MM> words. MM> e.g. MM> char s[40]; MM> gets(s); MM> puts("\r\nThis was the string you entered : "); puts(s); NO! Never! Bad! You've allocated 40 bytes, but the user could easily type 4000. use: char s[40]; fgets (s, 40, stdin); printf ("\n\nThis was the string you entered: %s\n", s); --- PointEd 2.0 * Origin: The Tibbs' Point - Ottawa, Ontario, Canada (1:163/215.38) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1^00001 Date: 01/30/98 From: RON BASS Time: 12:09am \/To: MATHIEU BOUCHARD (Read 1 times) Subj: Re: converting char to string You wrote: MB> NULL is defined as being of type void *. This may be true in C, but in C++, if NULL is defined at all it is defined to be the constant integer value of 0. This is discussed at length in Scott Meyer's "Effective C++" (get the second edition). This is because the stronger typing rules in C++ means that a pointer to a real class type cannot be assigned a value defined as a void pointer type. In fact, the only assignment between different pointer types that is valid is to assign a pointer for a derived class type to a pointer to a base class type. Any other pointer assignemnt or pointer comparison is illegal under the proposed C++ standard and will be flagged as an error by any reasonably up to date compiler. The proposed standard explicitly allows a pointer to be assigned the constant integer value of 0 to create a NULL pointer and to be compared to the constant integer value 0 as a check for a NULL pointer. Hence if we look at the following code... class A { ...// some class definition }; class B : public A { ... // some derived class definition }; and then in the main body of the code we have A foo; // foo is an A on the stack B bar; // bar is a B on the stack A* pF = &foo; // valid (in a trivial way) A* pB = &bar; // valid since a B "is-a" A A* pANULL = 0; // valid since assingment to 0 is allowed void* pVNULL = 0; // also valid pANULL = pVNULL; // error because A is not // derived from a "void object" pANULL = (void*) 0; // error MB> NULL is reserved for pointers; i often use 0 instead, though. I'm not MB> sure whether it is actually desirable that i recommend using 0, MB> though... :-) Under C++, the constant integer 0 is the only valid way to represent a NULL pointer that can be used with any type of pointer. -Ron (ron-bass@ti.com) --- EZPoint V2.2 * Origin: There's a point here, somewhere... (1:128/13.3)