C/C++问题。

1。怎么更好的学习MFC,MFC和C++的学习有关系吗?2。API对C++以及VC的学习有帮助吗?3。C++和VC可以同时学习吗?4。不学API,直接学习MFC有困难吗?... 1。怎么更好的学习MFC,MFC和C++的学习有关系吗?
2。API对C++以及VC的学习有帮助吗?
3。C++和VC可以同时学习吗?
4。不学API,直接学习MFC有困难吗?
展开
 我来答
发财嚟
2006-03-20
知道答主
回答量:81
采纳率:0%
帮助的人:0
展开全部
1.找一本VC++关于MFC的书来看吧
2.有
3.我觉得还是直接学C++吧,C++功能更强大些。C++是C的超集。
4.应该说学好API对MFC的学习大有帮助
slobber
2006-03-19 · TA获得超过871个赞
知道答主
回答量:326
采纳率:0%
帮助的人:272万
展开全部
MFC本来就是Windows的一个API,MFC使用C++的语法(本来就是C++的扩展),但是确确实实,完完全全不是C++。你学会了C++,MFC还是有很长的路要走。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
ursace
2006-03-19 · TA获得超过2085个赞
知道小有建树答主
回答量:535
采纳率:0%
帮助的人:251万
展开全部
1、用心学就会学好,没关系
2、有
3、可以
4、有
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友be056e1c1
2006-03-19 · 超过12用户采纳过TA的回答
知道答主
回答量:371
采纳率:0%
帮助的人:106万
展开全部
有关电脑方面的都有用!好好学吧!!!
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友b6eb159a9
2006-03-20 · TA获得超过108个赞
知道答主
回答量:150
采纳率:0%
帮助的人:77.1万
展开全部
Is C a subset of C++?
In the strict mathematical sense, C isn't a subset of C++. There are programs that are valid C but not valid C++ and even a few ways of writing code that has a different meaning in C and C++. However, C++ supports every programming technique supported by C. Every C program can be written in essentially the same way in C++ with the same run-time and space efficiency. It is not uncommon to be able to convert tens of thousands of lines of ANSI C to C-style C++ in a few hours. Thus, C++ is as much a superset of ANSI C as ANSI C is a superset of K&R C and much as ISO C++ is a superset of C++ as it existed in 1985.
Well written C tends to be legal C++ also. For example, every example in Kernighan & Ritchie: "The C Programming Language (2nd Edition)" is also a C++ program.

Examples of C/C++ compatibility problems:

int main()
{
double sq2 = sqrt(2); /* Not C++: call undeclared function */
int s = sizeof('a'); /* silent difference: 1 in C++ sizeof(int) in C */
}

Calling an undeclared function is poor style in C and illegal in C++. So is passing arguments to a function using a declaration that doesn't list argument types:
void f(); /* argument types not mentioned */

void g()
{
f(2); /* poor style C. Not C++ */
}

In C, a void* can be implicitly converted to any pointer type, and free-store allocation is typically done using malloc() which has no way of checking if "enough" memory is requested:
void* malloc(size_t);

void f(int n)
{
int* p = malloc(n*sizeof(char)); /* not C++. In C++, allocate using `new' */
char c;
void* pv = &c;
int* pi = pv; /* implicit conversion of void* to int*. Not in C++ */
}

Note the potential alignment error caused by the implicit conversion of the void* to a int*. See the C++ alternative to void* and malloc().
When converting from C to C++, beware that C++ has more keywords than C:

int class = 2; /* ok in C. Syntax error in C++ */
int virtual = 3; /* ok in C. Syntax error in C++ */

Except for a few examples such as the ones shown above (and listed in detail in the C++ standard and in Appendix B of The C++ Programming Language (3rd Edition)), C++ is a superset of C. (Appendix B is available for downloading).
Please note that "C" in the paragraphs above refers to Classic C and C89. C++ is not a descendant of C99; C++ and C99 are siblings. C99 introduces several novel opportunities for C/C++ incompatibilities.

--------------------------------------------------------------------------------

What is the difference between C and C++?
C++ is a direct descendant of C that retains almost all of C as a subset. C++ provides stronger type checking than C and directly supports a wider range of programming styles than C. C++ is "a better C" in the sense that it supports the styles of programming done using C with better type checking and more notational support (without loss of efficiency). In the same sense, ANSI C is a better C than K&R C. In addition, C++ supports data abstraction, object-oriented programming, and generic programming (see The C++ Programming Language (3rd Edition)"; Appendix B discussing compatibility issues is available for downloading).

I have never seen a program that could be expressed better in C than in C++ (and I don't think such a program could exist - every construct in C has an obvious C++ equivalent). However, there still exist a few environments where the support for C++ is so weak that there is an advantage to using C instead.

For a discussion of the design of C++ including a discussion of its relationship with C see The Design and Evolution of C++.

Please note that "C" in the paragraphs above refers to Classic C and C89. C++ is not a descendant of C99; C++ and C99 are siblings. C99 introduces several novel opportunities for C/C++ incompatibilities.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(3)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式