[LCP]sizeof question.
A
inbox at andy.co.uk
Mon Sep 23 04:09:01 UTC 2002
On Saturday 21 September 2002 1:10 am, you wrote:
# A wrote:
#
# | On Friday 20 September 2002 8:13 pm, you wrote:
# | # Nope. It's there.
# | # I added the case because the calloc is in C file that is being included
# | # as part of a c++ project. It's the c++ compiler that bitches, not the
C # | # compiler.
# |
# | That is quite interesting. As I understood it the C89 standard was fully
# | incorporated into the C++ 98 standard (which was then deviated from with
C99) # | which would mean that the c++ library stdlib should have the C
style calloc # | prototype in it. I'll remember not to use the sun c++
compiler then ;-), who # | knows where they've put things.
#
# You've missed the point -- you can't compile C with a C++
# compiler. They are different languages. The cast is required
# in C++ and is a mistake in C. If you write C, you should use a
# C compiler.
I wasn't syggesting that I would compile C code in a C++ compiler, I was
simply saying that if the code works in gcc but not in Sun's compiler I would
try to keep away from sun's compiler. You are correct though that c++ does
not allow implicit conversions of void*.
----A
#
# Greg
# _______________________________________________
# This is the Linux C Programming List
# : http://lists.linux.org.au/listinfo/linuxcprogramming List
#
#
#
More information about the linuxCprogramming
mailing list