No the code is not in a function.
You can't just put arbitrary statements outside of functions in C and C++. What you can do though is use a function to initialize the variable:
char** init_lines() {
char** ln = /* ... */;
// your allocations etc. here
return ln;
}
char** lines = init_lines();