Hướng Dẫn Sử Dụng Visual Studio Code Lập Trình C/C++
[0:50] Bước 1: Tải VSC
[1:09] Bước 2: Tải extensions C/C++ và Code Runner
[3:15] Bước 3: Viết chương trình C cơ bản “Hello World”
[6:24] Bước 4: Viết chương trình C++ cơ bản “Add 2 numbers”
[10:22] Cách dừng chương trình C/C++ bằng Stop Code Run
[10:50] Cách sửa lỗi “Cannot edit in read-only editor VS Code”
———— ✪ About CodeXplore Channel ✪ ————
CodeXplore là một platform chia sẻ kiến thức về Lập Trình [Coding] dành cho các bạn trẻ Việt Nam từ một cựu du học sinh Sing, hiện đang sống và làm việc tại Singapore.
Channel của mình sẽ focus vào các chủ đề sau:
► [Code] Full-Stack Web Development (HTML, CSS, JavaScript, Node JS và React JS) ☞ Future Projects: Deno
► [Code] Coding (Python & JavaScript) Interview Preparation (Cấu Trúc Dữ Liệu và Thuật Toán & LeetCode Solutions)
► [Xplore] Travel Vlog (Chia sẻ kinh nghiệm đi du lịch và trải nghiệm)
——————–
✪ Business inquiries: codexplore.channel@gmail.com
✪ Subscribe:
➥ CodeXplore Social Links:
Fanpage:
Instagram:
GitHub:
#VisualStudioCode #LậpTrìnhC #C++
———————————————-/————-
© Bản quyền thuộc về CodeXplore
© Copyright by CodeXplore ☞ Do not Reup
Nguồn: https://jacarandarmfm.com/
Xem thêm bài viết khác: https://jacarandarmfm.com/tong-hop/
Hello các bạn, mình đã tổng hợp Một Số Errors – Lỗi mà các bạn thường gặp và cách khắc phục khi sử dụng Visual Studio Code vs Lập Trình C/C++ nhé:
[Common Error #1] #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit
Solution: e thử click chuột phải vào dòng có lỗi đó, nó sẽ hiện ra option "Add to "include Path:", e thử xem thế nào nhé. A thấy trên stackoverflow cũng có 1 số bạn đã gặp lỗi giống vậy vs C/C++ Extension:
https://stackoverflow.com/questions/45583473/include-errors-detected-in-vscode
[Common Error #2] [Running] cd "e:CTDL-GTcontest 6" && g++ c.cpp -o c && "e:CTDL-GTcontest 6"c
'g++' is not recognized as an internal or external command,
operable program or batch file.
Solution: e thử add g++ vào trong Environmental PATH Variables của máy e xem sao nhé.
Trong windows, g++ nằm ở C:mingw or C:Program Filesmingw.
Nếu chưa cài g++, e có thể tại tại via https://sourceforge.net/projects/mingw-w64/
Cách add g++ vào Environmental PATH: click chuột phải vào biểu tượng This PC -> chọn Properties -> Advanced system settings -> Environment Variables.
Rồi trong phần Environment Variables > chọn System Variables > PATH và click on Edit.
Click New và click on Browse và tìm thư mục mà em cài mingw.
Khởi động lại VS Code và VS code sẽ tự động tìm g++
anh ơi em muốn tách hẳn cái terminal ra và dùng cái cmd giống kiểu visual studio thì làm thế nào anh ?
[Running] cd "/Users/ngocdung/Documents/Code/C-CPP/" && g++ HelloWorld.h -o HelloWorld && "/Users/ngocdung/Documents/Code/C-CPP/"HelloWorld
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
/bin/sh: /Users/ngocdung/Documents/Code/C-CPP/HelloWorld: Permission denied
Lỗi như này thì khắc phục như nào ạ. em mới sài mac và vừa tìm hiểu vs code ạ
Ai coi Hana nghe đoạn giới thiệu là biết ngay :))
Anh ơi cái vscode của em nó bị lỗi ko hiện cái error lúc code giờ sửa ntn anh (em gg đủ kiểu r vẫn chưa fix dc :(( )
dạ em chỉ mới tải vs code, tải extension c/c++ với code runner và chạy thử hello world trên c++ y như anh chỉ nhưng mà em lại gặp lỗi này ạ. Anh xem hộ em với ạ :<
ChauChau-MacBook-Pro:Châu Châu tommy$ g++ Hello.cpp -o Hello
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anh ơi em lm giống anh mà lúc run code nó hiển thị
"Connection to server got closed. Server will not be restarted" thì khắc phục sao ạ (。ŏ﹏ŏ)
e làm giống a mà nó k chạy ạ . a giúp e với
[Running] cd "e:visual" && gcc testvisual.c -o testvisual && "e:visual"testvisual
'gcc' is not recognized as an internal or external command,
operable program or batch file.
em làm giống anh nhưng bị lỗi "undefined reference to `WinMain@16'" thì fix làm sao ạ …
cho em hỏi: em lỡ tay bấm mất cái hiện lỗi code ở problems ,có cách nào để nó trở lại không hả a ?
cho e hỏi cách khắc phục lỗi lỗi undefined reference to winmain@16' error id returned 1 exit startus ạ
video được của ló , hay
em cảm ơn anh nhé e làm đc rồi
em lam nhu a roi ma no ko run dc
no hien ra nhu the nay a
S C:Arbeitenhọc lập trìnhc-c++> cd "c:Arbeitenh?c l?p trìnhc-c++" ; if ($?) { g++ Main.cpp -o Main } ; if ($?) { .Main }
g++ : The term 'g++' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:51
+ cd "c:Arbeitenhọc lập trìnhc-c++" ; if ($?) { g++ Main.cpp -o Mai …
+ ~~~
+ CategoryInfo : ObjectNotFound: (g++:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:Arbeitenhọc lập trìnhc-c++>
câu intro nghe giống ai đó
làm mấy khóa intro to basic c/ c++ lun a
Cùng theo dõi để cập nhật những thông tin mới nhất nhé. http://codenobug.net/2020/05/19/powershell-la-gi-va-nhung-tien-ich-mang-lai/
cho em hỏi lỗi này là bị gì vậy ạ?
[Running] cd "e:CTDL-GTcontest 6" && g++ c.cpp -o c && "e:CTDL-GTcontest 6"c
'g++' is not recognized as an internal or external command,
operable program or batch file.
Em làm giống anh mà em lại bị lỗi. Mong anh giúp
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit
Chú ơi, giọng chú hay quá :))
Con sub r chú chịu khó ra nhiều nhiều vid nha.
làm về python ấy chú.
Anh ơi của em cài theo anh rồi mà hiện ra #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit
thank you so much :))