Created
August 15, 2013 00:27
-
-
Save hz9xa/6237175 to your computer and use it in GitHub Desktop.
warning: deprecated conversion from string constant to ‘char*’
#Cprogramming
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| warning: deprecated conversion from string constant to ‘char*’ | |
| The correct way to fix this is to find every declaration like | |
| char *s = "constant string"; | |
| or function call like: | |
| void foo(char *s); | |
| foo("constant string"); | |
| and make them const char pointers. | |
| Escape % in printf using %% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment