3 ms·
Are you saying something in C++ is preventing you from issuing that 'rm -rf' command?
by trickstra 7y ago
Are you saying something in C++ is preventing you from issuing that 'rm -rf' command?
- kbumsik 7y agoHe is saying that Bash can also cause catastrophic behaviors by an as simple mistake as unsetting $DIR. C++ at least reject to compile when a variable is not set.
- trickstra 7y agoAny language can cause a catastrophic scenario like that. It's not a feature of the language. Not even the goal of the language to protect from something like rm -rf. The variable could have been set to empty string and C++ would just comply with what the programmer wrote (not what they meant, but that's a completely different thing).