#include <unistd.h>
#include <term.h>
void ClearScreen()
{
if (!cur_term)
{
int result;
setupterm( NULL, STDOUT_FILENO, &result );
if (result <= 0) return;
}
putp( tigetstr( "clear" ) );
}
I use this code in Xcode v10.1 and the debugger said that
"ISO C++11 does not allow conversion from string literal to 'char *' "
what should i do to clean my screen in xcode v10.1 with c++11?
(Source: http://www.cplusplus.com/articles/4z18T05o/#POSIX)
Aucun commentaire:
Enregistrer un commentaire