
cpp-programming.blogspot.com
C/C++ Programming Tips and TricksC/C Programming Tips and Tricks. Wednesday, February 01, 2006. Char* from static variables. When a function expects a char* parameters, it is not possible to pass a char[][] variable, which should have allowed us to avoid dynamic memory allocation. Merely casting the char[][] will produce undesirable results. Example:. Void iterate(char* a, count) {. For(int i=0; i<count; i=". Int main () {. Char str array[32][128];. Iterate( char* )(str array), 32);. However, we can do this:. Char* str array[32];.
http://cpp-programming.blogspot.com/