Unable to properly use Visual Studio Code for C++ Coding

Some Backstory and Info:-
This is my first time using Stack Overflow. So I may be inefficient in describing my issues, I apologize for that.
I mainly use C++, and also know C and Python.
I am a college student learning Computer Science, and would say that I have Intermediate coding skills, but I always used online compilers to do code like OnlineGDB or Programiz.
Now I am trying to use an Offline Compiler, the most popular being VS Code. But I am just unable to properly set it up.
I have intermittently tried to set it up from scratch multiple times still it just doesn’t seem to work.
I have watched multiple tutorials, still it doesn’t work.

The Issues Are:-

  • Whenever I run code on it it just throws errors “Undefined Reference to WinMain”.
    Here is what it shows.

C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o): in function main': C:/M/B/src/mingw-w64/mingw-w64-crt/crt/crtexewin.c:67:(.text.startup+0xbd): undefined reference to WinMain’
collect2.exe: error: ld returned 1 exit status

  • When I run VS Code using the New Project command prompt using ‘mkdir’ given in the VS Code website, it makes a new folder on its own, and the programs do execute as intended only if it doesn’t take user inputs.
    When taking user inputs it just doesn’t take it. Be it typing normally after executing the code, or after taking the cursor to the output part.
    Here is the failed input process for an integer input on a Simple Salary output code.

  • I also can’t seem to figure out how to manage the different files and folders, how to properly create new files, which files are executable and which are text files. What are the requirements for the folders to be used by VS Code. I have tried finding tutorials for it, but everyone just does it so effortlessly that I just can’t replicate it, also the fact that the compiler itself hasn’t been working for me.
    I feel too overwhelmed with all the buttons and options available, as I don’t understand a huge part of the lingo.

Closure:-
I have installed mingw, msys2, and put the proper path variables, and undone and redone it multiple times. Still i can’t figure it out on my own and with each attempt i keep feeling more and more helpless.
The irony is, I helped a friend setup C++ on his VS Code a few days ago using tutorials, and it worked for him perfectly fine (Although he did Java coding on it previously).
Although I have prior coding knowledge and exam question knowledge, I am a hopeless noob for computer applications like this, as I am highly reliant on my mobile and seldom use my Laptop for work, thus this all feels a bit over the top for me.
If any more information is required I will be happy to provide it.
Any useful tutorial recommendations or tips are greatly appreciated.
Thanks in advance.

I have tried multiple times to run VS Code on my laptop still it doesn’t work.

New contributor

ARUNAVA MUKHERJEE is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật