Re: program that compiles in C but not in C++?
From: Nils O. Selåsdal (noselasd_at_frisurf.no)
Date: 01/10/04
- Next message: Wolfgang Kaufmann: "Re: program that compiles in C but not in C++?"
- Previous message: Chris \( Val \): "Re: Sizeof question"
- In reply to: Digital Puer: "program that compiles in C but not in C++?"
- Next in thread: Arthur J. O'Dwyer: "Re: program that compiles in C but not in C++?"
- Reply: Arthur J. O'Dwyer: "Re: program that compiles in C but not in C++?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 10 Jan 2004 17:37:11 +0100
In article <btn8v2$olk$1@daisy.noc.ucla.edu>, Digital Puer wrote:
> I came across a question that asked for me to write a
> small program that will compile in C but not in C++.
> Any ideas?
>
> The only one I can think of is one that tries to
> downcast a void * to a more specific pointer without
> a cast:
void foo(){
unsigned char c = 0xfa;
char *d = &c;
}
void foo(){
char or[] = "or";
}
-- Nils Olav Selåsdal <NOS@Utel.no> System Developer, UtelSystems a/s w w w . u t e l s y s t e m s . c o m
- Next message: Wolfgang Kaufmann: "Re: program that compiles in C but not in C++?"
- Previous message: Chris \( Val \): "Re: Sizeof question"
- In reply to: Digital Puer: "program that compiles in C but not in C++?"
- Next in thread: Arthur J. O'Dwyer: "Re: program that compiles in C but not in C++?"
- Reply: Arthur J. O'Dwyer: "Re: program that compiles in C but not in C++?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|