just use -w option for g++
example:
g++ -w -o simple.o simple.cpp -lpthread
Remember this doesn't avoid deprecation rather it prevents showing warning message on the terminal.
Now if you really want to avoid deprecation use const keyword like this:
const char* s="constant string";