Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Which is the best book and what are the best tools for C programming in Windows 7?

Would using C in any way hinder me when it comes to using the Windows API as opposed to using C++ or C#? I would like to use C, because it seems to me that object-oriented programming is bad for performance and the abstraction seems only counter-productive if the right people are doing the programming. I will mostly do GUIs and background services that do a lot of networking, possibly at OSI Layer 2, and public key + cascaded symmetric key cryptograpy.

Also, the core of the programs (excluding any that deal directly with OSI Layer 2) should be portable to Android.

share|improve this question

closed as not a real question by Yannis, Mark Trapp Feb 2 '12 at 21:23

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Best tool for C programming on Windows without a doubt: Microsoft Visual Studio. As for the rest of your question: good luck with that. –  PersonalNexus Feb 2 '12 at 20:41
You're restricting yourself from using any language remotely supporting a paradigm (C++ for example is quite multi-paradigm: a lot of C++ code, including significant parts of the highly acclaimed Boost library, is "object-oriented" only in that is puts some functions into structs), on the grounds of performance and some people not getting their heads around OOP? –  delnan Feb 2 '12 at 20:42
If the question wasn't about Windows programming, I'd suspect you were Linus Torvalds trolling us... –  Yannis Feb 2 '12 at 20:46
Ummm... I have a C program included into Debian and Ubuntu, and another into Sunfreeware. LOL –  nlovric Feb 2 '12 at 20:58
@PersonalNexus - You know that Visual Studio 2010 still doesn't have a lot of the features of C99 right? See here. VS is much more suited to C++ development than C. –  Jetti Feb 2 '12 at 21:02

1 Answer 1

Given that the entire Win 32 API is exposed primarily as C functions, there' no hinderance to using C, other than maybe the lack of libraries.

The best book to start with is probably still Programming Windows by Charles Petzold. It's showing its age, but the basics haven't changed, and all the new stuff can be learned best through MSDN's online reference - which is where you should go once you've gotten started anyway.

The best environment for C under windows is usually Visual Studio. You can use the express c++ version if you don't want to pay for the bigger versions. Just use the /TC switch to compile as C code rather than C++. It does lack some of the newer C features, but it's a solid compiler that works well with Windows.

As to your editorial on C vs C++ programming, it "seems to me" like you're jumping the gun in assuming any performance gains / losses between object-oriented and procedural programming.

share|improve this answer
What about the Portland Group PGI C / C++ (PGI Workstation, PGI Accelerator Compilers); would that be better? It supports C-99. –  nlovric Feb 2 '12 at 21:31
PellesC is another choice. –  Gary Willoughby Feb 2 '12 at 22:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.