Previous Slide Static Next Slide

Example: A string cannot easily grow. In other words, without doing some dynamic allocation, the maximum size of a string is predetermined:
char label[10] = "value";
...
// Not enough room, though it will attempt it anyhow!
strcpy(label, "How now brown cow?");


BU CAS CS - A String Class: Part I - Lab
Copyright © 1993-2000 by Robert I. Pitts <rip@bu.edu> All Rights Reserved.