+ 1
Cpp: (int n=1; int draft [n];) is this correct way of using array
My compiler(devc++) runs it. but SoloLearn cant run it. Here is my code: https://code.sololearn.com/cUF2UhT7IlVC/
3 Réponses
+ 1
In Sololearn you have to give all inputs in advance, so cins in branches does not work here unfortunately :/
+ 1
In C this correct. In C++ this is incorect, but if you make n const it is correct. Btw, welcome to C/C++ cross-platform development: almost all code is non-standard and everyone relies on the behavior of their compiler.
0
Omg lol. For some reason my compiler runs this. But i guess we just count this as non standard method. Tbh it takes 5 seconds to just start the code when i first compiled it.