0
Secret message - code coach
I was trying to do code coach secret message. Here is my code in c++ https://code.sololearn.com/cb2qlbIQ5acs/?ref=app This code is passing 4 out of 5 test but get failed in test-4 I don't have sololearn premium so i can't see what is going wrong Any sololearn premium user please check this code
2 Respostas
0
You are writing into an empty string, which is undefined behaviour. Either construct `ec_text` with a sufficient initial size, i.e. `len`, or make it a char instead (since you write the output character by character anyway).
0
Shadow thanks pal