You might need to use a dynamic allocation which would then require delete. I don't think the compiler will let you do that the way you have because I don't think strlen(msg) is technically considered a constant.
It looks like you want to copy the message before sending it to the log. Depending on what you intend to do, you might want to avoid that step entirely. Simply send msg directly to the log rather than copying it to a new message then sending it to the log, it's a constant anyway so you're not going to hurt it.
is the input array dynamically allocated?
In this case, do I have to use the delete  in order not to have a memory leak?
Not really. And strictly speaking, that is not a valid declaration in C++, you should get a compiler error as the array size must be a constant (a literal value or a const variable - argh, I don't like that description.) It must be a value known at compile time, and not changeable.
However, the new C standard does allow such array construction, and some C++ compilers are beginning to support that. If it works in your compiler, you shouldn't need a delete as it's a variable local to the function and will be removed from the stack when the function returns.
g++ is one compiler that is jumping the gun on the variable size array declarator.
"static" and "stack" are two words that generally don't go together. static variables are not located on the stack (nor on the heap, as I'd always thought. Narue, I believe, put out a very good discussion on this a while back.)
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.