- #1
Arman777
Gold Member
- 1,911
- 149
I will take Intro to C programming this semester and can I use MVS for coding C ?
Yes. I use it for both C and C++ programs.I will take Intro to C programming this semester and can I use MVS for coding C ?
I haven't heard of anyone having something go wrong when they downloaded Vis. Studio.Is it possible that it can harm my computer If I do smthing wrong in the downloading process ? How can I download and run it safely ?
İnstructor shared a link for to run C in MinGW. But I couldnt download it from there cause its too complex .I haven't heard of anyone having something go wrong when they downloaded Vis. Studio.
I agree with @Mark44 that you can download and use it with no problems. It is a good super-IDE but just try to stay focused on your code and learn the extra IDE features with patience. Many years before I was using DevC++ and it was good enough for educational purposes as well as for building some open source software.- more recently I had installed a fork with C++11 support. There is a relatively new release at SourceForge.net .I will take Intro to C programming this semester and can I use MVS for coding C ?
I always liked to tinker with tool chains particularly of GCC, as a way to learn and set up things exactly the way I like. The same holds for maintaining and modifying if necessary the PATHs of Windows, as for a lot of other Windows OS things. But these don't come as suggestions without warnings. If you really like to do it this way - even independently of Microsoft Visual Studio, you have to study through resources, references and tutorials and do things in a safe way without putting anything at stake. If you're aiming to be a good programmer or software developer, I would also recommend to learn to program on a Linux distro besides Windows.İnstructor shared a link for to run C in MinGW. But I couldnt download it from there cause its too complex .
http://mingw.org/wiki/Getting_Started
"After installation you will need to perform some additional tasks yourself to ensure your MinGW applications will run. Most importantly, you will need to make changes to your PATH environment variable. Be careful: there are two PATH variables which can be changed, and changing the wrong one can have significant consequences. Instructions for changing the correct PATH variable are provided below."
And many more warnings etc. I guess theres no such needs in MVS
Assuming that you have installed the Visual C++ redistributable for Visual Studio 2017, you can create "New Project" > "Visual C++" > "Win32 Console Application" >"Next" > "Console Application" and "Empty Project". Now, click "Finish" and add a new source file from the relevant menu and give your source file name the .c extension, ignoring the options displayed. Hope this helps.I installed VC++ because I wanted to see how easy it was to set up but I can't get it to work right either. For example, I tried to #include <stdio.h>; and it complains, but #include <cstdio>; doesn't.
Thanks. It was my fault in the end, I deselected a bunch of stuff in the installer, too many in fact, but adding them back left the solution in a confused state. I had to delete it and create a new solution and it's now working properly. I think I prefer Code::Blocks (I tried that after Arman mentioned it) because it's closer to how it is on Linux. The one difference I see is it uses g++ to link the executable like so: g++ -o myapp.exe main.o. But otherwise it's just like it is on Linux which should be very compatible with his class although from what I can tell, adding main.c to an empty project in MSVC is working fine as well.Assuming that you have installed the Visual C++ redistributable for Visual Studio 2017, you can create "New Project" > "Visual C++" > "Win32 Console Application" >"Next" > "Console Application" and "Empty Project". Now, click "Finish" and add a new source file from the relevant menu and give your source file name the .c extension, ignoring the options displayed. Hope this helps.
As for <cstdio>, it includes <stdio.h> and adds the associated names to the std namespace. Here's the relevant Microsoft web page.
Once you have loaded your project in VS, open Solution Explorer, if you don't already have that as a pane that is showing. To open the Solution Explorer pane, under View, click Solution Explorer.@Mark44, can you elaborate on what settings need to change to enable C in the most compatible way possible? Thanks.
Just FYI, C coding is what MVS started with and it has never been left out. As for installations, I've installed many versions on several different machines and have never had the least bit of problem. It's really wonderful that MS now gives away the full version to individuals. I've paid out quite a bit for versions over the years (I've been using it from the beginning) and I was delighted when I found that it's now free.I will take Intro to C programming this semester and can I use MVS for coding C ?