--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400004 Date: 10/28/97 From: CAMERON CLARK Time: 03:41pm \/To: CHRISTIAN FELDE (Read 2 times) Subj: Re: Help me... CF> I've just started reading a C++ book, and I'm using Linux to compille the CF> source. CF> sco-systems:~/work/code# g++ somefun.cpp somefun.cpp:48: unterminated strin CF> or character constant somefun.cpp:40: possible real start of unterminated CF> constant sco-systems:~/work/code# CF> CF> ...and I don't understad any thing! CF> if ((ageThisYear == 40) CF> else You're missing a matching ')'. --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400005 Date: 10/28/97 From: CAMERON CLARK Time: 03:49pm \/To: BRIAN S (Read 2 times) Subj: Re: write << BS> void main () BS> { BS> myoutput write; BS> write << "Hello World"; BS> } BS> ------------------------------------------------------------------------- BS> BS> I would like to be able to call my << function multiple times like the cout BS> class. for example : BS> BS> write << "Hello " << "World"; Overload the '<<' operator for each primitive data type like so. friend myoutput& operator<< (myoutput& m, char* c) { m.Ostream << c; return m; } // I'm assuming that Ostream is an ostream object myoutput m; m << "String 1" << "string 2"; m<<"String 1" - returns a myouput reference myouput& << "string 2" - returns a myoutput reference --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400006 Date: 10/29/97 From: CAMERON CLARK Time: 03:57pm \/To: RORY STREET (Read 2 times) Subj: Re: Java++ RS> :) Okay and with Java can this only be run under Unix as done with GNU C or RS> can you run it under any OS that takes it? Any machine that has 'java interpreter' software. Unlike C++ (another poor attempt to stay on topic), Java compiles to a standardize 'byte code' [not to proprietary object code like C++ uses]. This byte code can be run on any machine using the interpreter. I've seen unix/solaris, win95/nt interpreters so far. Unlike C++ object files, the .class files (the compiled byte code) is meant to be ran anywhere. I'm not to sure on how portable the actual source code itself is (since MS and Sun compilers have some inconsistancies). --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400007 Date: 10/29/97 From: CAMERON CLARK Time: 03:59pm \/To: ROSE (Read 2 times) Subj: Re: Java R> Ok, in J++, how exactly do I get a simple program to determine R> which key has been pressed WITHOUT having to press the enter key each R> time? I am new to this language, so the entire few lines of code would R> be needed. I have had people tell me little bits, but if I knew enough R> to put that together, then I wouldn't have to need to ask any of these R> questions, would I? There is a Java sub on fidonet. Maybe your sysop can request it for you. --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400008 Date: 10/31/97 From: CAMERON CLARK Time: 02:01pm \/To: ANTHONY TIBBS (Read 2 times) Subj: Re: C/C++ Compiler Wanted AT> If anyone has either Borland C++ 4.5x+ or Watcom 10.6, and they'd like to s AT> it, please let me know! I'm in desperate need of one of these two compiler AT> (Watcom 11.0 is too buggy for me to bother with it.) AT> AT> Please be aware that I am a student, and financially don't have $350 laying AT> around for a compiler :-) If you are a college student, you can get the 'professional' versions of c++ builder, visual c++, etc for $100 or less. Symantec has a C++ compiler IDE for about $50 or less. --- GEcho 1.00 * Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400009 Date: 11/02/97 From: THOMAS HABETS Time: 10:23pm \/To: PAUL WANKADIA (Read 2 times) Subj: cout Thanks!/Watcom? PW> nothing had to be changed, apart from my AUTOEXEC.BAT (to put 'C:\DJGPP\BIN' PW> into the PATH). Don't forget to "set DJGPP=C:\DJGPP\DJGPP.ENV" --- * Origin: http://thomas.habets.pp.se - be there or...eh...don't (2:201/293.22) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400010 Date: 11/01/97 From: GEORGE WHITE Time: 11:04am \/To: JAMIE KOWINSKY (Read 2 times) Subj: sizeof() question Hi Jamie, You asked: JK> I normally use sizeof on variables, but recently foudn JK>out that it can be used on a struct name without even JK>having a variable declared as that struct type. for JK>example if I have a struct called StudentType and I wanted JK>to know the size of StudentType (without calc'ing by hand) JK>I would do somthing like this: JK>long studentsize; JK>StudentType temp; JK>studentsize = sizeof(temp); JK>however i recently found out that I can simply do studentsize = JK>sizeof(StudentType); Well at least in Turbo C++ 4.5 one JK>can, I don't know if this is standard. JK>Now my question is, does the compiler treat JK>"sizeof(StructName);" as a constant? During compile time JK>will it lookup the size of the stuct and simply use that JK>number instead of calculating the size of the stucture each JK>time? As sizeof() is a compile time operator (ie it is evaluated during compilation, not during program execution) there is no easy way of knowing how the compiler evaluates it internally. It'll only affect compile time anyway. JK>I'm useing Turbo C++ 4.5, and with its limitations I'm JK>guessing no, but I'm also wondeing if a 'good' c++ compiler JK>would do it (ie Watcomm, Borland)... I assume they will all behave similarly as the compiler has to know the size of the structure internally when allocating space for instances of the struct. George * SLMR 2.1a * A mainframe: The biggest PC peripheral available. --- Maximus/2 3.01 * Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF400011 Date: 11/02/97 From: MICHAEL RATHBURN Time: 07:08pm \/To: JONATHAN DE BOYNE POLLARD (Read 2 times) Subj: Help Please Hi Jonathan de Boyne Pollard, hope you are having a nice day 27-Oct-97 19:53:58, Jonathan de Boyne Pollard wrote to Chris Downs Subject: Help Please CD>> I would love to hear a good explanation as to why 3.142(double) CD>> != 3.142(float) JdBP> Try converting them from base 10 to base 2. JdBP> Remember that IEEE 754 Short Real (float on most platforms, JdBP> including x86 PCs) has a 23 bit significand, and that IEEE 754 JdBP> Long Real (double on most platforms) has a 52 bit significand could you explain that in plain English like whats a significand ? and What's IEEE 754 ? -=> Yours sincerely, Michael Rathburn <=- --- Terminate 5.00/Pro * Origin: When did you last warm yourself with a Terminate! (2:250/124.19) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: EF500000 Date: 11/03/97 From: KURT TISCHER Time: 07:02pm \/To: ERIK VILELA (Read 2 times) Subj: C++ in VB 5 EV>How could i put C++ code in a VB 5 app. Should i do a .DLL inC++ and use EV>VB or something ??? That's about it. Create a DLL and call the functions from VB. kt * SLMR 2.1a * There's nothing like an Ozzy Ozbourne "Yeah"... --- ViaMAIL!/SL v1.30 * Origin: ViaMAIL! - If you run Searchlight, you gotta have it! (1:157/438)