lab 6 warning eas230

lab 6 warning eas230 - that "ptr"...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Warning for Mac users. .. when you use the following on a Mac: char *ptr[4]= {"ab", "cd", "ef", "gh"}; you get this warning: ptrTest.cpp:6: warning: deprecated conversion from string constant to 'char*' You can either ignore the warning, or simply put a "const" before char, which makes the memory address
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: that "ptr" points to a constant (although the contents of the ptr variables can change).So const char *ptr[4]= {"ab", "cd", "ef", "fg"}; ptr[0] = "hij"; // change contents of ptr[0] ...works fine....
View Full Document

Ask a homework question - tutors are online