From: George F. <geo...@me...> - 1998-11-29 21:44:29
|
On Sun, 29 Nov 1998 Xlo...@ao... wrote: > In a message dated 11/28/98 8:01:17 AM Pacific Standard Time, > geo...@me... writes: > > > > > The c file: > > > try saving it as cc and using gxx > > > > Why? > > sometimes it solves some problems Those problems are very specific compile-time/link-time problems, and this isn't one of them. :) If you write C++ code in a .c file and it doesn't compile then yes, that's the solution to the problem -- use a .cc file and the C++ compiler. If doing this seems to solve any other problems, it probably isn't really solving them. It's probably just sweeping the real problem under the carpet. Please don't regard it as a generic, magic fix -- it isn't one. In particular, using the C++ compiler instead of the C compiler isn't a fix for run-time problems. If it does seem to fix such a problem, something else is wrong, which has probably just been obscured by the fact that the C++ compiler optimises differently and generates code differently. Nine times out of ten this sort of `fixed' bug resurfaces later on, when there's a lot more code in the project, and this sort of bug tends to be very hard to track down. It's best to fix bugs thoroughly when you find them. :) -- geo...@me... xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/ |