--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECX00010 Date: 08/23/97 From: KEVIN CAMPBELL Time: 09:00am \/To: CHRISTOPHER BUTLER (Read 3 times) Subj: DOS Window > Hi Kevin! > When Kevin Campbell wrote to Christopher Butler on Friday August 01 > 1997, Kevin was talking about DOS Window. >>> Is there a way to confine the output of a DOS program to a certain >>> window on the screen? > KC> I think the command window() should work. > Nope... It didn't. :( Well, it should. Why not write your own routine. Text memory begins at 0xB800:0x0000. Simply make a pointer to that memory and alter it. It's in a two byte arrangement. One for attribtues (colour, flash, etc.) and another for the letter (in ascii). Have Fun - Kev Kevin Campbell Sysop of Deimos BBS E-Mail: Sysop@Deimos.unmanned.co.uk --- FMail/386 1.02 * Origin: Mail shipped from Deimos Spaceport (2:258/8) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECX00011 Date: 08/23/97 From: KEVIN CAMPBELL Time: 09:01am \/To: BRAD CARSON (Read 3 times) Subj: Tricks.. Guru's. > GD> I wouldn't think so. It would either be Microsoft or Borland. > GD> Did you say you had Turbo C or Turbo C++? No C compiler will > GD> compile C++ programs... > As I said before, I'm not sure.. I have Turbo C++. It wouldn't work > with > that. Hell, it's OWN examples wouldn't work with it. Something was > wrong > with it or something.. I tried to compile this example CIRCLE.CPP that > came > with it and it reported errors in the GRAPHICS.H.. Like undefined > symbol > _closegraph etc.. The problem is that you don't have the MS compiler libraries, and I don't think you've actually made a project file and add the files required into it correctly... There are Borland varients of every command for Turbo C. Have Fun - Kev Kevin Campbell Sysop of Deimos BBS E-Mail: Sysop@Deimos.unmanned.co.uk --- FMail/386 1.02 * Origin: Mail shipped from Deimos Spaceport (2:258/8) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECX00012 Date: 08/23/97 From: KEVIN CAMPBELL Time: 09:03am \/To: VIKTOR OSADCHUK (Read 3 times) Subj: Reset > > วด, Rajesh !!! > RD> int far *post=0x00000472; > RD> post=0x1234; /* If you want the memory check on reboot */ > RD> geninterrupt(0x19); /* Works with Borland C compilers like TC, BC, > ...*/ > === Cut === > #include > #include > void main() > { > cout <<"\n" << "Reboot your computer ?" > <<"\n"; > char a=getch(); > switch (a) { > case 'Y': > case 'y': > asm { > mov ax,0 > mov es,ax > mov ax,1234h > mov di,0472h > mov es:di,ax /* Error: Memory reference expected */ > int 19h > } > break; > default: > break; > } > } > === Cut === > Borland C++ 3.01. Error : Memory reference expected !!! Why ?! Put square brackets around the reference "mov [es:di],ax". Have Fun - Kev Kevin Campbell Sysop of Deimos BBS E-Mail: Sysop@Deimos.unmanned.co.uk --- FMail/386 1.02 * Origin: Mail shipped from Deimos Spaceport (2:258/8) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECX00013 Date: 08/23/97 From: KEVIN CAMPBELL Time: 09:05am \/To: DARIN MCBRIDE (Read 3 times) Subj: template hell? > Practice is great for the first little bit. > But employers don't pay you to practice - they pay you to get results. > If > using the template version will turn out a product in 1 week less time > (nevermind 1-2 weeks less debugging time!), they'll go for it. If the > speed > penalty is too much, then there is a business decision to spend the > extra 3 > weeks to switch to a hand-coded version. Usually the speed penalty is > too > small to warrant the three weeks. Well, the good thing now is that I have all of the code I'll ever need, stored in a huge library. That way, I can reuse it as much as I like, optimise it as I see fit, and I've still got the source :) Have Fun - Kev Kevin Campbell Sysop of Deimos BBS E-Mail: Sysop@Deimos.unmanned.co.uk --- FMail/386 1.02 * Origin: Mail shipped from Deimos Spaceport (2:258/8) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECX00014 Date: 08/26/97 From: FRANK SWARBRICK Time: 06:44pm \/To: FRANK MASINGILL (Read 3 times) Subj: MATHPLAY.CPP On 08-23-97 22:28, waiting for 22, Frank Masingill said: FM> Cliff, here is the program after I made the changes you FM> suggested. I do hope to develop it into a full-fledged C++ with FM> some object-oriented features and I'm studying all of the examples I FM> can find in my books and disks. I started this as a project for the FM> kids next door to play with when we keep them and wanted to get it FM> to the point where they could play with it. I'm not going to comment on your code or make any criticisms, but I just had to smile at your program. My first program, when I was in seventh grade and using BASIC on a TRS-80 Model III, was a math program quite similar to this! I guess it's just such an obvious thing to use. Anyway, I couldn't resist commenting. Now back to your regularly scheduled, errr, programming. :-) (another) Frank ... No one can hear when you're Screaming in Digital! ___ Blue Wave/QWK v2.12 --- PCBoard (R) v15.3 (OS/2) 5 * Origin: The Mars Hotel, Aurora,CO - FidoNet (1:104/520) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECY00000 Date: 08/24/97 From: ! AUTOPOST ! Time: 04:21pm \/To: ALL (Read 3 times) Subj: Blank Message --- PKT-Generator. PKTGen V0.909 (UNREGISTERED) * Origin: -= AutoPost =- Neil Thurlow 1996-97 (2:255/122) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECY00001 Date: 08/27/97 From: PAUL WANKADIA Time: 07:41pm \/To: ALL (Read 3 times) Subj: hidden functions Can anyone tell me the names of the secret functions with any number of preceding underscores that get called when I create an object? The only thing I've ever heard is something to do with '_____________builtin' and a bunch of gobblegobbleturkeygook after it. TIA. --- PPoint 2.00 * Origin: Junyer's Workshop (1:342/1022.2) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECY00002 Date: 08/25/97 From: TOM TORFS Time: 09:43am \/To: LEIGH MORRESI (Read 3 times) Subj: WATCOM and C++ Leigh Morresi wrote in a message to All: LM> hey!, ive got WATCOM V11.0, and wondering how do you do LM> simple inline assembly, without the use of confusing pragma's a LM> stuff?? LM> i mean, is it possible todo it like borlands C?, ie asm; { LM> lalalalal }; ???? You'll have to use something like this: #pragma aux rord = \ "xor ch,ch" \ "and cl,31" \ "rord_loop:" \ "shr dx,1" \ "rcr ax,1" \ "jnc rord_nocf" \ "or dh,10000000b" \ "rord_nocf:" \ "loop rord_loop" \ parm [dx ax] [cl] \ value [dx ax] \ modify [cx]; 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: ECY00003 Date: 08/28/97 From: JEAN PILON Time: 03:58pm \/To: KURT KUZBA (Read 3 times) Subj: Re: c++ & visual c++ JP> does anyone can tell me what the difference between JP> regular c++ and visual c++ ?? KK> Visual C++ is made by Microsoft and includes MFC, which is KK> the Microsoft Foundation Class Library. KK> It is still C++. For what it is worth, I like it. KK> But then, I also like Quick C and Borland C++ 3.0. :) KK> What is best for you is what is best suited to your KK> programming needs and chosen or required environment. KK> If you are working in Windows NT, then VC++5.0 is likely KK> to be a good choice, though it would be mostly useless in KK> a LINUX environment, where GCC++ may be a better choice. KK> If you are working in a popular environment, then there KK> should be a number of popular compilers available. KK> Perhaps a look at WHICH_C.TXT in SNIPPETS would be of some KK> help to you. It addresses this question in greater detail. thanks you alot for these presious infos. ciao! ... Catch the Blue Wave! --- PoPa Sbe / 2 Nodes! * Origin: POPA SBE // Ste-Therese // 430-0251 * 430-1524 =- (1:242/902) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: ECY00004 Date: 08/28/97 From: CLIFF RHODES Time: 04:40pm \/To: FRANK MASINGILL (Read 3 times) Subj: Crazy.Cpp --> Frank Masingill wrote to Cliff Rhodes <-- FM>Hey, Cliff and gang. How's this? Frank, it looks pretty good. You've got a functioning class! FM>Too Borland spcific? The only Borlandism is clrscr(), so that's not too bad. FM>#include FM>#include FM>#include FM>class crazy FM>{ FM> private: FM> int pooky, kooky; FM> float smoky; FM> public: FM> void install(int p, int k, float f) FM> { FM> pooky = p; kooky = k; smoky = f; FM> } FM> void display() FM> { FM> cout << "Pooky = " << pooky << endl; FM> cout << "Kooky = " << kooky << endl; FM> cout << "Smoky = << $" FM> << setiosflags(ios:: showpoint) FM> << setprecision(2) FM> << setw(2) FM> << smoky; FM> } FM>}; FM> FM>void main() FM>{ FM> crazy kookie, lookie, smooky; FM> kookie.install (100, 200, 4.50); FM> clrscr(); FM> kookie.display(); FM>} Here is my version: #include #include #include class crazyII { private: int pooky, kooky; float smoky; public: // Instead of an Install() function, I used a constructor. It is // just like your Install() except it is automatically called when // a crazyII object is created--so no c.Install(x, y, z); is needed. // You should use constructors for this reason. // Also notice I have given default values for each of the // arguments. C++ allows this in functions. That means you can // use this constructor to create crazyII objects by giving 0, 1, // 2, or 3 arguments. For the ones not given, the default value is // used. Note that you can only drop arguments from right to left. // You could not skip an int value and put a float for instance. crazyII(int p = 0, int k = 0, float f = 0.0f) { pooky = p; kooky = k; smoky = f; } // Instead of a Display() function, I overloaded the << operator. // This is much more convenient. The notation is a little // complicated to do this, but using the result is easy. friend ostream & operator << (ostream & os, crazyII & c) { // Given the output stream os, use its << operator to // display object c's members. os << "Pooky = " << c.pooky << endl; os << "Kooky = " << c.kooky << endl; os << "Smoky = " << setiosflags(ios:: showpoint) << setprecision(2) << setw(2) << c.smoky << endl; return os; // Return the reference to the ostream } }; int main(void) { crazyII c1; // Create a crazyII with all default values. crazyII c2(25, 50, 3.1415); // crazy II object with my values. clrscr(); cout << c1; // Use overloaded << to display c1 cout << c2; return 0; } Cliff Rhodes cliff.rhodes@juge.com crhodes@flash.net X CMPQwk 1.42 1692 X"The wisest men follow their own direction." - Euripides --- Maximus/2 3.01 * Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)