0

C++ array as parameter

When I run this on a computer it works as expected but print some extra question marks. Where am I going wrong? https://code.sololearn.com/ciXTiWmgeUKI/?ref=app

20th Aug 2021, 11:33 AM
JarBeatz
JarBeatz - avatar
4 ответов
+ 6
The code itself should be correct, compiling with -fsanitize=address & -fsanitize=undefined indicates no faulty behaviour. What characters did you intend to store in the array? Right now you are filling it with control characters that usually have no graphical representation: https://tools.piex.at/ascii-tabelle/
20th Aug 2021, 11:50 AM
Shadow
Shadow - avatar
+ 3
I don't see any question mark running from SoloLearn.
20th Aug 2021, 11:48 AM
你知道規則,我也是
你知道規則,我也是 - avatar
0
CarrieForle it runs well on this app but if you open the link on desktop you'll see some extra question marks there. For e.g |A1 | ... The question mark is inserted after A1 where there's a space. On this app it only insert space but question marks on desktop.
20th Aug 2021, 3:47 PM
JarBeatz
JarBeatz - avatar
0
Ok guys I got it. Line 17 was the one giving me problems but after commenting it out I got the desired results 😁
20th Aug 2021, 4:05 PM
JarBeatz
JarBeatz - avatar