Is it dangerous to use C++ without knowing memory management?
Depends on what you consider "dangerous" and, how willing you are to learn and other factors.
If you attempt to write a program without understanding the language, and without attempting to learn it, then the outcome is likely a program that doesn't work, or one that appears to work but breaks when a seemingly unrelated condition changes.
Is it necessary to know memory management while developing programs in C++ normally?
It depends.
It's (possibly surprisingly) easy to write even complex programs while avoiding any manual memory management. However, at minimum you must still understand the lifetime of objects which may be considered a basic part of memory management.
Furthermore, if you were to be tasked with developing programs that do involve memory management, then you wouldn't be able to understand it without understanding memory management.
Can we damage computer memory if we don't know it?
No, not in most cases. Unless you are writing a program that controls a robot arm that can reach and damage its own circuits.
取决于您认为的“危险”以及您的学习和其他因素的愿意。
如果您试图在不了解语言的情况下编写程序,而又不尝试学习语言,那么结果可能是一个无法正常工作的程序,或者似乎有效的程序,但在看似无关的条件发生变化时会破坏。
这取决于。
(可能令人惊讶的是)易于编写复杂的程序,同时避免任何手动记忆管理。但是,至少您仍然必须了解可能被认为是内存管理的基本部分的对象的寿命。
此外,如果要制定涉及内存管理的程序的任务,那么如果不了解内存管理,您将无法理解它。
不,在大多数情况下不是。除非您正在编写控制一个可以触及并损坏自己电路的机器人臂的程序。
Depends on what you consider "dangerous" and, how willing you are to learn and other factors.
If you attempt to write a program without understanding the language, and without attempting to learn it, then the outcome is likely a program that doesn't work, or one that appears to work but breaks when a seemingly unrelated condition changes.
It depends.
It's (possibly surprisingly) easy to write even complex programs while avoiding any manual memory management. However, at minimum you must still understand the lifetime of objects which may be considered a basic part of memory management.
Furthermore, if you were to be tasked with developing programs that do involve memory management, then you wouldn't be able to understand it without understanding memory management.
No, not in most cases. Unless you are writing a program that controls a robot arm that can reach and damage its own circuits.