I am failing to create a list of strings in KDB C++ API. This is what I am doing:
K lst = ktn(KC,0);
jk(&lst, kp((S)"str_1"));
jk(&lst, kp((S)"str_2"));
r1(lst);
k(h, (S)"{show type x}" , lst, (K)0);
r1(lst);
k(h, (S)"{show count x}", lst, (K)0);
r1(lst);
k(h, (S)"{show x}" , lst, (K)0);
The output
10h
2
"\260\260"
Where instead of "\260\260" could be some other random string repeated twice. It seems, I do create a list of strings, but the list contains rubbish for whatever reason. Could you please help me to understand what I am doing wrong here?
Thank you for your help!