em mới tải VSC mà k chạy được, lên gg thì ngta bảo chỉnh environment gì đấy, làm theo thì thấy đúng r mà nó hiện như dưới là sao ạ
Không chạy được VSC
It’s a bit harsh to tell you the truth about your current IT knowledge: you know nothing about OS.
Do you know what an operating system is? If not, you should start learning the operating system before you start using a computer. There you’ll learn what an operating system is, why an operating system environment is necessary, and how to set one up. Then you’ll understand why IDEs and compilers depend on the operating system and its environment settings.
Not knowing the basics of an operating system is like jumping into a deep river without knowing how to swim. The result: you’ll drown in operating system problems caused by a lack of knowledge of how to swim in operating systems.
Lại một lần nữa “biết rồi, khổ lắm, nói mãi”: chưa học bò mà lo học chạy. Một bợm không/ chưa biết sử dụng máy tính ở mức Power User, thậm chí còn chưa được mức Normal User mà đòi viết code (tức tạo phần mềm cho người khác xài).
Câu hỏi đặt ra là bạn có tin rằng một người chưa từng ăn món nào đó mà nấu món đó và bạn dám ăn món do anh ta/ cô ta nấu?
Bọm chủ topic nên gõ: VS Code Windows GCC++ Configuration, làm đủ các bước đó nếu không chạy thì lên đây trình bày lại.
Túm cái quần què lại: 5W + 1H khi trình bày vấn đề không bao giờ thừa, nhờ đó người ta mới gỡ rối được. Như hiện tại thì chủ status kiểu… “tui cóc biết gì về vật lý ngoài chương trình phổ thông hãy giúp tui giải phương trình về rối lượng tử” <= thánh thần cũng bái lạy thým này.
dạ, e mới là sv năm nhất, học lập trình nên về mò thôi ạ chứ k có ý định tạo phần mềm gì đâu, lần đầu tiếp xúc với mấy cái này nên còn nhiều cái chưa hiểu ( tôi bị ngu ) cảm ơn bạn đã trả lời hic
As a student, you’re already an adult with a good education. Every work or project begins with planning, followed by review before implementation.
If you want to drive a car, the first thing you learn is what the car needs: electricity or fuel? Then, where to refuel or charge the battery with electricity. Finally, you learn how to steer the car, operate the brakes, and other things like the windshield wipers, etc. If you don’t learn this, you’ll start driving the car right away and wonder why your car is behaving strangely.
Similar to that, you buy a computer, turn it on, download an IDE and a compiler, and start writing a piece of “software”… and wonder why something went wrong? Because you didn’t learn how your computer works.
What is a system and user environment? The system/user environment is the where you define where you want to save the data (as a file) and where it should be read. The “where” is the paths. The IDE looks for the specified paths and, if it doesn’t find them, saves the data to its own default paths or the user’s operating system default paths. Typically, the IDE has a path environment by default and makes it available to the underlying compiler. However, this isn’t always the case. Therefore, as the user, you must specify this environment for your IDE and compiler. Otherwise, confusion arises between the IDE and compiler, leading to unpredictable problems.
Bạn nên đọc theo hướng dẫn này https://code.visualstudio.com/docs/languages/cpp#_run-helloworldcpp
Không thì bạn nên học cách để tự build & run
Ctrl+Shift+` mở terminal, gõ lệnh
$ # ls files
$ ls
filename.cpp
$ # build
$ g++ filename.cpp
$ # ls file after build
filename.cpp a.out
$ # run
$ ./a.out
$ # need more magic
$ man g++
Lời khuyên: bạn nên học code bằng notepad