home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ for Dummies (3rd Edition)
/
C_FD.iso
/
CHAP04
/
CHAP04_1.CPP
next >
Wrap
C/C++ Source or Header
|
1996-09-02
|
375b
|
14 lines
// Chap04_1.c
int main()
{
const char * pCC = "this is a constant string";
char * const cpC = "this is also a string";
*pCC = 'a'; //assignment #1 - illegal
*cpC = 'b'; //assignment #2 - legal
pCC = "another string"; //assignment #3 - legal
cpC = "another string"; //assignment #4 - illegal
return 0;
}