--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00001 Date: 06/06/97 From: TIKA CARR Time: 01:16pm \/To: KEVIN CAMPBELL (Read 3 times) Subj: Windows Program reading f Kevin Campbell says to Bert Byfield BB> Does Windows compiling require a Windows compiler? KC> Yes. I can compile a Windows program in the DOS IDE of Borland C++ 3.1. Ok, I'm cheating, you still do have to have the Windows headers, libraries and OWL, etc. installed. Basically, you can compile a Windows program from the DOS command line too, without Windows even running. But like I say, it needs to find the Windows.h and other (if needed) headers and the Windows .LIB file(s) and memory models. So, you are right, but I thought I'd mention that one detail. Tika ... Windows user's favorite ice cream: Hoggin' DOS. ___ Blue Wave/DOS v2.30 --- QScan/PCB v1.17b / 01-0406 * Origin: Knight Moves - Rochester,NY 716-865-2106 (1:2613/313) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00002 Date: 06/04/97 From: ERIC BRAYEUR Time: 08:41am \/To: ALL (Read 3 times) Subj: Colors Hi ALL, Can anyone tell me how to change the current color of cout ? --- * Origin: .277 (2:293/4004.277) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00003 Date: 06/04/97 From: CAMERON CLARK Time: 08:47pm \/To: SADOVNIKOV SERGEY (Read 3 times) Subj: Re: template hell? SS> CC> This is how I did the headers. Any ideas? SS> SS> If I understood correct, you define function 'method' in .cpp file. This SS> not correct way for working with templates. Any functions, which work ith SS> template classes must be declare and define in header, because compiler can SS> extract code of it's template from .obj modules. In .cpp files you must def SS> only common abstract methods for working with _ANY_ type of storing objects Yes, I defined the methods in the .cpp file. I'll have to move it over into the .h file and try again. --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00004 Date: 06/04/97 From: CAMERON CLARK Time: 08:49pm \/To: STEVE WESTCOT (Read 3 times) Subj: Re: Array size too big. SW> struct maptile { SW> char type; //What the map tile looks like SW> unsigned int x, y; //Map tile coordinates SW> int attr; //Map Attributes...specifics not listed SW> char special[81]; //Special field for map attributes SW> char text[341]; //Map tile Description SW> int ansifg, ansibg, ansiattr; //Ansi colors and attributes SW> } SW> int main(void) { SW> SW> maptile local_map[9][21]; /* Size of Display area plus 1 tile buffe SW> on each side of Display */ SW> return 0; SW> } try "maptile* local_map[9][21];" then allocate a new maptile for each 0-8x0-20 cells --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00005 Date: 06/04/97 From: CAMERON CLARK Time: 08:57pm \/To: JERRY COFFIN (Read 3 times) Subj: Re: template hell? JC> CC> class DLList { JC> CC> Node* head; // head node in list - dummy ode JC> CC> public: JC> CC> Node* cur; // current node used to seach the list JC> JC> Why do you make this public? I can't tell how you're using it, but it JC> looks like something that ought to be private... It should be private for the sole purpose of encapsulation. A return current method does exist so its data can be returned. JC> simple data type, you're probably better off passing a const reference JC> instead of an actual item by value. I.e. I'd change this to: JC> JC> method(dtype const &item); This will save on stack space for each call. If the record was that big then maybe a list of them might not be a good idea. JC> Basically you use: JC> JC> ret_type full_class_name::method_name(params); JC> JC> In the case of a template, the full name of a class looks like: JC> JC> class_name JC> JC> instead of just: JC> JC> class_name JC> JC> that you use with a non-templated class. Hopefully that makes some JC> sense instead of just making things muddier... JC> Later, JC> Jerry. I hate the way that templates are done in C++. I'm sure it makes it easier for the compiler writer, but, it makes the code unintuitive and clutered. --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00006 Date: 06/04/97 From: CAMERON CLARK Time: 08:59pm \/To: CHRISTIAN ANDERSEN (Read 3 times) Subj: Re: template hell? CA> Have you made the class functions inline, that is the implementation of the CA> class in the header file? CA> A template class should not have a corresponding CPP file. That must be my screw-up. I took the idea from my professor that inorder to write a template version you write a fully debuged version using a specific simple data type and then replace it with the template class. This left me with a .h and .cpp file. --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00007 Date: 06/04/97 From: LEON VARGHESE Time: 08:36am \/To: ALL (Read 3 times) Subj: String manipulation Hi all. L needs a little help again. Does anyone have ideas on this one: I have a string: "a:\cpp\filename.cdm" and I want to change its file extension so it reads "a:\cpp\filename.trk" I have made an attempt (which I won't post here) which is really messy. I am hoping that someone can figure out an easier way. big TIA -L --- Blue Wave/DOS v2.30 * Origin: **Sawasdi BBS** sawasdi.apana.org.au 61 8 82617802 (3:800/846) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00008 Date: 06/05/97 From: MARAT AFANASYEV Time: 05:55pm \/To: JASON HULME (Read 3 times) Subj: cin >> errors Hi, Jason! Jason Hulme wrotes to All: JH> Another problem I am havings is reading a float value for a file using JH> _dos_read. The only content of the file is 123.45 but when dos_read JH> reads this value is returns 123.45\x1. What does \x1 mean? IMHO, _end_of_file_ :-) And why should you use _dos_read? why not to try ifstream instead? AMF, Marat. aka Marat.Afanasyev@ksu.ru Kazan University. --- * Origin: 'Curioser and curioser' - cried I (2:5049/16.12) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00009 Date: 06/04/97 From: HORACIO J. PEA Time: 11:10pm \/To: ALL (Read 3 times) Subj: Cross compiling with GCC From: horape@compendium.com.ar (Horacio J. Pea) Hi! Somebody has some info about it? (i wanna compile linux programs from djgpp & viceversa) Very many tnx, Horacio J. Pea Pero no vull que els teus ulls plorin: digue'm adu. El cam fa pujada i me'n vaig a peu. --- ifmail v.2.9 * Origin: Compendium (4:901/341@fidonet) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EAB00010 Date: 06/06/97 From: DAN MCGREGOR Time: 04:50pm \/To: ERIC BRAYEUR (Read 3 times) Subj: Colors EB> Hi ALL, EB> Can anyone tell me how to change the current color of cout ? Look up the Textcolor(int) functions in C. There are also #define's for: GREEN MAGENTA BLACK GREY GRAY RED etc... --- Squish/386 v1.11 * Origin: The Dragons Cave - Sysop Point (1:140/237.2)