Question:
windows programming in c and windows programming in c++ ?
afzal_009_your
2011-07-12 07:56:15 UTC
what is the difference between windows programming in c and windows programming in c++. these are two seperate languages but at some point they become the same thing. that is what i want to ask you that it is c or c++ in which we develop windows programms. plz explain me. thx
Three answers:
peteams
2011-07-12 10:07:12 UTC
C and C++ are note strictly separate languages, C++ is pretty much a superset of C. C++ has an construct extern "C" that transforms C++ semantics into C semantics.



Assuming you're talking about Microsoft Windows, then the enter API is specified in C. If you dig into Windows' header files you'll find the following sequence that pushes C++ into C mode:



#ifdef __cplusplus

extern "C" {

#endif



When you program in C++ rather than C you'll typically take advantage of a library. Microsoft has previously promoted two C++ libraries, MFC and the more lightweight ATL. More recently MFC and ATL have been merged into one.



The Windows API is object-oriented; you tend to work with references to objects like windows, brushes, etc. Libraries like MFC include features that wrap up the references into C++ class objects. So in raw Win32 API you talk to a windows through a handle type HWND; when you're using MFC those get wrapped inside a CWnd class.
JBere
2011-07-12 08:00:04 UTC
C++.

Windows foundations are based on objects and classes. C is not an object oriented language, so it has no support for Windows objects.



C and C++ are NOT two separate languages that became the same thing. C is a language. C++ is a superset of C, adding object-oriented principles. Anything you can do in C, you can do explicitly in C++ without modification.
dally
2016-10-23 02:43:57 UTC
you're writing textual content cloth records, so Notepad will artwork. Notepad Plus (it truly is loose) would be greater tender to artwork with - it's going to colour the textual content cloth in accordance to the syntax, and you will locate matching parentheses and brackets.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...