I have written this content by translating it using ChatGPT 3.5.
Developed and tested a prototype C/C++ program using the JetStream examples, resolved issues encountered during development, and added the necessary modifications to the examples.
When directly converting the 'Subjects' variable, declared as 'char []', to 'const char **' and passing it to the 'js_AddStream' function, a SIGSEGV occurred, leading to program termination.
'SubjectsLen' is named in a way that suggests it can invoke the 'strlen' function, so I clarified in the comments that it represents the number of elements.
It is necessary to set 'MaxBytes' to limit the memory size of the stream.
(In my test environment, when not setting the memory for the stream, the NATS.io SERVER's memory keeps increasing, causing the container to become unresponsive. 53 streams, each with one subject per stream.)
I have written this content by translating it using ChatGPT 3.5.
Developed and tested a prototype C/C++ program using the JetStream examples, resolved issues encountered during development, and added the necessary modifications to the examples.