<p>I'm trying to learn C. As a C# developer, my IDE is Visual Studio. I've heard this is a good environment for C/C++ development. However, it seems no matter what little thing I try to do, intuition fails me. Can someone give good resources for how to either:</p>

<ul>
<li>learn the ins and out of C in Visual Studio</li>
<li>recommend a better C IDE + compiler</li>
</ul>

<hr>

<p><strong>Edit:</strong> See also: <a href="https://stackoverflow.com/questions/951516/a-good-c-ide">https://stackoverflow.com/questions/951516/a-good-c-ide</a></p>

[{'answer_id': 28617, 'author': 'Konrad Rudolph', 'author_id': 1968, 'author_profile': 'https://Stackoverflow.com/users/1968', 'pm_score': 1, 'selected': False, 'text': '<p>Some people say that a smaller IDE is better for learning. Take a look at <a href="http://www.codeblocks.org/" rel="nofollow noreferrer">Code::Blocks</a>. It\'s generally true that beginning C in an IDE is hard because not many books explain enough to control the IDE. Perhaps starting in a console and a basic text editor with syntax highlighting would be better – at least under Linux. Since Windows\' console is far from great, I\'d not recommend using it.</p>\n\n<p>/EDIT: Dev-C++ used to be the best freely available IDE for Windows. However, it\'s development has been discontinued years ago and the most recent version unfortunately is full of bugs.</p>\n'}, {'answer_id': 28618, 'author': 'sparkes', 'author_id': 269, 'author_profile': 'https://Stackoverflow.com/users/269', 'pm_score': 5, 'selected': True, 'text': '<p>Answering the purely subject question "recommend me a better C IDE and compiler" I find <a href="http://www.codeblocks.org/" rel="noreferrer">Ming32w and Code::blocks (now with combined installer)</a> very useful on windows but YMMV as you are obviously used to the MS IDE and are just struggling with C.</p>\n\n<p>May I suggest you concentrate on console applications to get a feel for the language first before you attempt to tie it together with a windows UI which in my experience is the hardest bit of windows development.</p>\n'}, {'answer_id': 28619, 'author': 'mmattax', 'author_id': 1638, 'author_profile': 'https://Stackoverflow.com/users/1638', 'pm_score': 2, 'selected': False, 'text': '<p>Bloodshed Dev-C++ is the best windows C/C++ IDE IMO: <a href="http://www.bloodshed.net/" rel="nofollow noreferrer">http://www.bloodshed.net/</a>\nIt uses the GNU compiler set and is free as in beer.</p>\n\n<p>EDIT: the download page for the IDE is here: <a href="http://www.bloodshed.net/dev/devcpp.html" rel="nofollow noreferrer">http://www.bloodshed.net/dev/devcpp.html</a></p>\n'}, {'answer_id': 28621, 'author': 'Adam Davis', 'author_id': 2915, 'author_profile': 'https://Stackoverflow.com/users/2915', 'pm_score': 3, 'selected': False, 'text': '<p>Simple and sweet:  Console applications (basic C programs using printf and such) are easily and cheaply done with the Tiny C Compiler - a no frills, no gui, complete C complier.</p>\n\n<p><a href="http://bellard.org/tcc/" rel="noreferrer">http://bellard.org/tcc/</a></p>\n\n<p>However, C development is relatively simple on Visual Studio as well.  The following instructions will set Visual C++ up as a good C compiler, and it will produce console applications at first, and yo can move up into more complex windows apps as you go.</p>\n\n<ol>\n<li>Get the Visual Studio C++ edition (express is fine)</li>\n<li>Start a new project - disable pre-compiled headers (maybe the wizard will let you do this, maybe you\'ll have to change the compiler settings once inside the project)</li>\n<li>Delete everything inside the project.</li>\n<li>Create a new "example.c" file with the hello world example</li>\n<li>Compile and away you go.</li>\n</ol>\n\n<p>Alternately, get a linux virtual machine, or Cygwin.  But as you already have Visual Studio, you might as well stick with what you know.</p>\n\n<p>As an aside, this isn\'t Atwood learning C finally, is it?  No ALTs!  ;-D</p>\n\n<p>-Adam</p>\n'}, {'answer_id': 28627, 'author': 'Rob Cooper', 'author_id': 832, 'author_profile': 'https://Stackoverflow.com/users/832', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://xoax.net/comp/cpp/console/Lesson0.php" rel="nofollow noreferrer">http://xoax.net/comp/cpp/console/Lesson0.php</a></p>\n\n<p>Any use?</p>\n'}, {'answer_id': 28634, 'author': 'Antonio Haley', 'author_id': 390, 'author_profile': 'https://Stackoverflow.com/users/390', 'pm_score': 4, 'selected': False, 'text': '<p>The problem with learning C within Visual Studio is that you are compiling C using the Visual Studio C++ compiler. You might want to try learning C using the GNU <a href="http://gcc.gnu.org/" rel="noreferrer">GCC</a> compiler from within the <a href="http://www.cygwin.com/" rel="noreferrer">Cygwin</a> environment in Windows.</p>\n'}, {'answer_id': 28661, 'author': 'codeLes', 'author_id': 3030, 'author_profile': 'https://Stackoverflow.com/users/3030', 'pm_score': 2, 'selected': False, 'text': '<p>As already said, you should check out the VS.net C++ edition, but if you\'d like to try something else Eclipse has a C++ edition.  You can get more info from <a href="http://eclipse.org" rel="nofollow noreferrer">http://eclipse.org</a> or check out the distro at <a href="http://www.easyeclipse.org/site/distributions/cplusplus.html" rel="nofollow noreferrer">http://www.easyeclipse.org/site/distributions/cplusplus.html</a></p>\n'}, {'answer_id': 28672, 'author': 'mmattax', 'author_id': 1638, 'author_profile': 'https://Stackoverflow.com/users/1638', 'pm_score': 2, 'selected': False, 'text': "<pre>\nThe problem with learning C within Visual Studio is that you are compiling C \nusing the Visual Studio C++ compiler. You might want to try learning C using\nthe GNU GCC compiler from within the Cygwin environment in Windows.\n</pre>\n\n<p>This is a legitimate response, I posted an IDE that uses the GNU compilers, so why has he been down modded?</p>\n\n<p>This is the type of thing that will make me <strong>not use</strong> SO, why down mod someone just because they are recommending a different compiler, and IMHO, a better one then Microsoft's?</p>\n\n<p>get real people, and @Antonio Haley I gave you +1</p>\n"}, {'answer_id': 28689, 'author': 'Antonio Haley', 'author_id': 390, 'author_profile': 'https://Stackoverflow.com/users/390', 'pm_score': 1, 'selected': False, 'text': "<p>There's a very good reason to learn C and C++. The reason is that there's a lot of C and C++ code out there that are performing very real and important tasks. Someone who considers themselves a programmer and a learner(doubtful that you can separate the two) can learn a lot from these lines of code.</p>\n\n<p>You can learn a lot from each language by studying the other, but if you really want to grok C it's a lot easier to separate yourself from anything C++ for a while. Visual C++ is great but GCC is a great way to thrust yourself into vanilla ANSI C without having to mentally sidestep any C++.</p>\n\n<p>@mmattax thanks!</p>\n"}, {'answer_id': 535722, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>C in Visual Studio is fine, just use the command line compiler that is included in the Pro edition. Yes its the C++ compiler but treats all files ending .c as C . You can even force it to treat ALL files as C with a switch. The VS documentation has entries on it, just search the index for Visual C.</p>\n'}, {'answer_id': 959669, 'author': 'devdimi', 'author_id': 54983, 'author_profile': 'https://Stackoverflow.com/users/54983', 'pm_score': 1, 'selected': False, 'text': "<p>Visual Studio is one of the best IDEs for C/C++.\nI don't think it is complicated and hard to use - if you have questions about it - ask them. \nSome other compilers/IDEs are fine too, but if already have Visual Studio and have used it - why not stick to it?</p>\n"}, {'answer_id': 4177088, 'author': 'MehranNZ', 'author_id': 507292, 'author_profile': 'https://Stackoverflow.com/users/507292', 'pm_score': 6, 'selected': False, 'text': '<p>well you can use visual studio just fine take a look at here man\n<a href="http://www.daniweb.com/forums/thread16256.html" rel="noreferrer">http://www.daniweb.com/forums/thread16256.html</a></p>\n\n<p>Go to View Menu select Solution Explorer or CTRL+ ALT +L</p>\n\n<p>Then Select The project that your are developing and right click on that.</p>\n\n<p>Then select the Properties from the submenu.</p>\n\n<p>Then select the Configuration properties from the Tree structure. under that select C/C++ then select Advanced. Now in the right side pane change the property</p>\n\n<p>Compile As from Compile as C++ Code (/TP) to Compile as C Code (/TC)</p>\n\n<p>Finally change your file extensions to .c</p>\n\n<h1>Now you configured you Visual Studio to compile C programs</h1>\n\n<p><strong>And you can use NetBeans too it could even be more user friendly than Visual Studio download it you wont regret i promise</strong></p>\n'}, {'answer_id': 4493926, 'author': 'Hernán', 'author_id': 48026, 'author_profile': 'https://Stackoverflow.com/users/48026', 'pm_score': 1, 'selected': False, 'text': '<p>For plain C, I suggest <strong>Pelles C</strong>. Generates optimized code and supports C99 constructs. </p>\n\n<p>Features:</p>\n\n<ul>\n<li>Support for 32-bit Windows (X86),</li>\n<li>64-bit Windows (X64), and Windows Mobile (ARM). Support for the C99 standard. </li>\n<li>Integrated source code editor with call tips and symbol browsing. Integrated source-level\ndebugger. Project management. </li>\n<li>Inline assembler for X86 and ARM. </li>\n<li>Integrated resource editor. Integrated bitmap, icon and cursor editor. Integrated\nanimated cursor and video editor.</li>\n<li>Integrated hex-dump editor. </li>\n<li>Supportfor custom controls in the dialog editor. Support for custom project  wizards. \n<a href="http://www.smorgasbordet.com/pellesc/" rel="nofollow">http://www.smorgasbordet.com/pellesc/</a></li>\n</ul>\n'}, {'answer_id': 4847275, 'author': 'JJj', 'author_id': 596282, 'author_profile': 'https://Stackoverflow.com/users/596282', 'pm_score': 1, 'selected': False, 'text': "<p>When i used visual studio 5.0 it should compile c code as long as the header files and lib. are there for the compiler to find. In fact most C++ compilers like G++ will compile C code just fine. But i'm not sure how well..  If you are targeting a platform then you can change the header files and lib.  within you IDE and Compiler. </p>\n\n<p>Visual Studio has a great debugger that no other Compiler that i have seen can compete with.  I have been using gcc darwin10 4.2.1 and find the debugger is basically just the one you can getfree with any linux flavor. I recommend you learn both on a plain vanilla gcc compiler and also try visual studio which costs money.  The express edition does not allow the use of threading and several other things that I forgot about.  Visual Studio 5.0 should be ok to use and the debugger is much more human friendly then the one commandline version called GDB. Try DDD on linux which is similar to XCODE's debugger.  </p>\n\n<p>Although C++ and C are different you can compile both together. But you should understand each ones flaws and good points. C code is faster, but C++ is much easier to write and manage larger code.  C++ is object oriented but C is procedural while they are both imperative languages.  I would suggest learning objective-C since you can use both C++ and C libraries. Using the features you like in all three languages!!!  </p>\n"}, {'answer_id': 10347018, 'author': 'Viju', 'author_id': 1299956, 'author_profile': 'https://Stackoverflow.com/users/1299956', 'pm_score': 0, 'selected': False, 'text': '<p>Visual Studio or Express do consider .c files as C code, but the compiler will keep giving warnings, and irritating suggestions which you do not require, in the debugger. Gives an indication that Visual C++, as the name suggests is optimized for C++ development for the Windows Operating system, which was originally written in plain pure C.</p>\n'}]
['https://Stackoverflow.com/questions/28605', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/356/']