There is a C++ project which is migrated from old VC++ 6.0, We use Visual Studio 2010 now. We have the following small piece of C++ header code in a .h file: #include "Accessor.h" #include "SvMemDB.H" #include "cnserver.h" #include <fstream.h> When we compile the project, we first got the following compile error: error C1083: Cannot [Read More ...]

We have a C++ project based on Linux system, so we need a good Editor but not Visual Studio since the C++ is for Linux. And, we do not want to use Ubuntu but just use Windows 7. So we decide to download Eclipse for C/C++ Windows Edition from Eclipse official site. (Note: our Windows [Read More ...]

If you are learning C, C++ or even Java, the first code example might be similar, they are all a example named Hello World. We found a interesting article which collects all Hello World example in different languages. For example: In C: #include <stdio.h> int main(void) { printf("Hello world\n"); return 0; } In C++: #include [Read More ...]

Question: In C++, is there any difference between:struct Foo { … };andtypedef struct { … } Foo; Answer: 90 down vote accepted    In C++, there is no difference. It’s a holdover from C, in which it made a difference. In C, there are two different namespaces of types: a namespace of struct/union/enum tag names and [Read More ...]

GBK to UTF8 xmwen@126.com*/char *gbk2utf8(const char *strGBK){int len;wchar_t *strUnicode;char *strUTF8;if (!strGBK){return NULL;}len = MultiByteToWideChar(CP_GBK, 0,strGBK, -1, NULL,0);if (len <1){return NULL;}strUnicode = (wchar_t *) malloc(sizeof(wchar_t) * len);if (!strUnicode){return NULL;}len = MultiByteToWideChar(CP_GBK, 0, strGBK, -1, strUnicode, len);if (len<1){free(strUnicode);return NULL;}len = WideCharToMultiByte(CP_UTF8, 0, strUnicode, -1, NULL, 0, NULL, NULL);if (len<1){free(strUnicode);return NULL;}strUTF8 = (char *) malloc(sizeof(char) * len);if (!strUTF8){free(strUnicode);return [Read More ...]

Here is the list of C++ online reference: 1: Visual C++ 6.0 Online Documentation 2: C/C++ Languages and C++ Libraries 3: C++ Reference 4: C++ Reference 5: C++ Reference 6: Microsoft Visual C++ Developer Center

1: 内存映射文件,UnmapViewOfFile/MapViewOfFile

In C++ projects, to share data, multiple processes can use memory-mapped files that the system paging file stores. First process create memory file and other process open this memory file. CreateFileMapping Function OpenFileMapping Function The name of the file mapping object to be opened has the following rules (from MSDN):     Terminal Services:  The name [Read More ...]

When you create a MFC library project using Visual Studio 2010, you will see the following screen to ask you choose a DLL type, so you might be confused by the following 2 options: 1: Regular DLL using shared MFC DLL2: Regular DLL with MFC statically linked So which one you should select ? First [Read More ...]

© 2013 CodeEase.com Suffusion theme by Sayontan Sinha