Const char foo[] = "gives me an error"

Or use a pointer:
const char *foo = "hello world";