![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
minisun789
这个作者很懒,什么都没留下…
展开
-
c++ MFC file operation
Difference among CStdioFile, CFile and File: http://blog.sina.com.cn/s/blog_62e7f8c10100gvk8.html转载 2012-06-05 22:54:54 · 328 阅读 · 0 评论 -
C++ debug "cannot find the file Debug\***.pch" & how to debug multi-projects under one solution
When I finished a project under a solution, I found the name of the project was not so good. So I built a new project and copied all the file to the new project. However, it did not work and errored a转载 2012-06-05 23:01:03 · 325 阅读 · 0 评论 -
extern usage error "undefined reference to `xxx' "
When using "extern" in C++, I put "extern int xxx" in the "a.h" and all the other ".cpp" files contain this "a.h". Then, "int xxx = 10" is used in "main.cpp" to define it. However, error "undefined re转载 2012-07-18 02:20:12 · 1820 阅读 · 0 评论 -
using "cout" after "sscanf" gets two output
The following code causes node being output for twice. " char buf[10]; while (fgets(buf, 10, rfile) != NULL) { sscanf(buf, "%d %d", &node, &num); cout } " The r转载 2012-07-20 22:28:31 · 276 阅读 · 0 评论 -
Deal with the error "terminate called after throwing an instance of 'std::bad_alloc'"
This error in C++ is probably due to the memory leak, like using malloc() but forget to free it. For a loop, it usually works well when the loop is short; but when it is long, sometimes the probl转载 2012-12-02 02:50:05 · 480 阅读 · 0 评论