|
点击 |
回复 |
标题 |
作者 |
最后回复 |
|
1247 |
11 |
C++中字符串數據類型簡直多如牛毛! 比如char,char*,char[],wchar_t,wchar_t*,wchar_t[],string,wstring,String^,LPCS... |
巨大八爪鱼 |
8-19 巨大八爪鱼 |
|
3063 |
8 |
無關的參數全部傳遞NULL。 【示例1:下載一個png圖像,並保持到磁盤上】 #include <stdio.h> #include <Windows.h>... |
巨大八爪鱼 |
4-29 巨大八爪鱼 |
|
1108 |
2 |
在窗口類的構造函數中加上: //獲取程序目錄 SetCurrentDirectory("C:\\"); //模擬開機啟動 char ch[MAX_PA... |
巨大八爪鱼 |
2-14 巨大八爪鱼 |
|
967 |
3 |
【程序】 #include <fstream> #include <iostream> #include <Windows.h> #defi...  |
巨大八爪鱼 |
7-16 巨大八爪鱼 |
|
581 |
3 |
通過重載cout的<<運算符即可實現。 【程序】 #include <iostream> #include <Windows.h> usin...  |
巨大八爪鱼 |
7-16 巨大八爪鱼 |
|
1074 |
9 |
【運行效果】  |
巨大八爪鱼 |
6-20 巨大八爪鱼 |
|
533 |
3 |
#include <iostream> #include <string> using namespace std; class string_ex : pu...  |
巨大八爪鱼 |
6-20 巨大八爪鱼 |
|
459 |
0 |
#include <iostream> using namespace std; class Person { public:...  |
巨大八爪鱼 |
6-20 巨大八爪鱼 |
|
595 |
4 |
#pragma once #define PL_FREENAME 2 #define PL_FREEVALUE 1 typedef struct _tagParam {... |
巨大八爪鱼 |
6-7 巨大八爪鱼 |
|
578 |
1 |
Student a = b;調用的是複製構造函數 然而,Student a; a = b;調用的是等號運算符重載,不調用複製... |
巨大八爪鱼 |
6-6 巨大八爪鱼 |
|
583 |
4 |
因為在Dev-C++中可以把interface作為變量名。 例如: #include <iostream> using namespace std; int mai... |
巨大八爪鱼 |
6-5 巨大八爪鱼 |
|
583 |
3 |
// ConsoleApplication1.cpp : 定義控制台應用程式的入口點。 // #include "stdafx.h" #include <comutil.h... |
巨大八爪鱼 |
5-24 巨大八爪鱼 |
|
591 |
1 |
【代碼】 #include <algorithm> #include <iostream> using namespace std; int arr2[... |
巨大八爪鱼 |
5-22 巨大八爪鱼 |
|
1001 |
3 |
終極解決方案: VS2010在經歷一些更新後,建立Win32 Console Project時會出「error LNK1123」 錯誤,解決方案為將... |
巨大八爪鱼 |
5-20 巨大八爪鱼 |
|
440 |
1 |
【不用虛函數的情況】 在下面的程序中,聲明一個基類的指針變量,指向子類的實例,但是調用時卻只能調用父類的Show函數: #include "stdafx.h" #include... |
巨大八爪鱼 |
4-8 巨大八爪鱼 |
|
434 |
4 |
#include <iostream> using namespace std; int main(void) { int n...  |
巨大八爪鱼 |
3-23 巨大八爪鱼 |
|
362 |
1 |
#include <iostream> #include <string> #include <vector> using namespace s... |
巨大八爪鱼 |
3-22 巨大八爪鱼 |
|
386 |
0 |
注意num1, num2, newnum中的數位都是倒着寫的。比如1234要寫成4321,方便對其數位。 【代碼】 #include <iostream> using n... |
巨大八爪鱼 |
3-3 巨大八爪鱼 |
|
353 |
1 |
#include <iostream> #include <Windows.h> // 使用此函數輸出寬字符變量 // 普通字符串請直接用cout輸出... |
巨大八爪鱼 |
3-1 巨大八爪鱼 |
|
854 |
5 |
【程序】 // regtest.cpp : 定義控制台應用程式的入口點。 // #include "stdafx.h" #include <iostream>... |
巨大八爪鱼 |
2-29 巨大八爪鱼 |
|
721 |
14 |
【程序】 #include <mysql/mysql.h> #include <stdio.h> #include <tchar.h> #i... |
巨大八爪鱼 |
2-29 巨大八爪鱼 |
|
406 |
1 |
窗口大小為800x632  |
巨大八爪鱼 |
2-29 巨大八爪鱼 |
|
535 |
2 |
【1】在打開文件的時候,點擊「打開」按鈕旁邊的小三角形,選擇「打開方式」  |
巨大八爪鱼 |
2-25 巨大八爪鱼 |
|
488 |
0 |
http://www.rohitab.com/discuss/topic/39900-changing-aero-glass-color-with-wallpaper/ |
巨大八爪鱼 |
2-25 巨大八爪鱼 |
|
449 |
2 |
|
巨大八爪鱼 |
2-22 巨大八爪鱼 |
|
558 |
2 |
【功能】 調用Arslanbar2.0 API獲取並顯示最新的25個主題帖的標題。 【程序運行結果】  |
巨大八爪鱼 |
2-18 巨大八爪鱼 |
|
579 |
1 |
本例以訪問https://zh.arslanbar.net/API/為例。 【C++代碼】 // HTTP.cpp : 定義控制台應用程式的入口點。 // #include "... |
巨大八爪鱼 |
2-18 巨大八爪鱼 |
|
492 |
4 |
第一步:打開工程屬性,在配置中選擇「Release」,然後在「常規」中把「平台工具集」設置為「Visual Studio 2012 - Windows XP (v110_xp)」  |
巨大八爪鱼 |
2-16 巨大八爪鱼 |
|
475 |
1 |
第一步:打開工程屬性,選擇「所有配置」,在配置屬性->C/C++->預編譯頭中將預編譯頭設置為「使用(/Yu)」  |
巨大八爪鱼 |
2-16 巨大八爪鱼 |
|
414 |
0 |
|
巨大八爪鱼 |
2-16 巨大八爪鱼 |
|
717 |
15 |
|
巨大八爪鱼 |
2-10 巨大八爪鱼 |
|
1091 |
13 |
|
巨大八爪鱼 |
2-9 巨大八爪鱼 |
|
366 |
3 |
case WM_DRAWITEM: {... |
巨大八爪鱼 |
2-6 巨大八爪鱼 |
|
841 |
3 |
【函數的三個重載形式】 void fputs_UTF8(const wchar_t *str, FILE *fp); 用於將wchar_t字符數組寫入通過fopen打開的文件中。 v...    |
巨大八爪鱼 |
1-27 巨大八爪鱼 |
|
664 |
4 |
【說明】 在Windows作業系統下,wchar_t的大小是兩個字節,其默認的編碼方式是UTF-16(Unicode的一種存儲方式)。其中,每個基本多語言平面字符佔據兩個字節,也就是一個wch...  |
巨大八爪鱼 |
1-24 巨大八爪鱼 |
|
465 |
6 |
char[]是多字節字符串,一個字符可能用一個數組元素表示,也有可能用多個數組元素表示。 而wchar_t[]每個字符固定使用一個數組元素表示。 因此,char和wchar_t的根本區別是... |
巨大八爪鱼 |
1-23 巨大八爪鱼 |
|
401 |
1 |
所在文件夾是src/interface 這是一個很不錯的MFC參考項目。 |
巨大八爪鱼 |
1-16 巨大八爪鱼 |
|
468 |
0 |
// CreateClipboardData.cpp : Defines the entry point for the console application. // #include...   |
巨大八爪鱼 |
1-12 巨大八爪鱼 |
|
536 |
2 |
例如: 【程序】 // failcreating.cpp : Defines the entry point for the console application. // #... |
巨大八爪鱼 |
1-3 巨大八爪鱼 |
|
411 |
0 |
在文件頭部加上#include <string>即可。 // inserting strings into output streams #include <iostre... |
巨大八爪鱼 |
1-3 巨大八爪鱼 |
|
431 |
1 |
共有14種  |
巨大八爪鱼 |
1-2 巨大八爪鱼 |
|
620 |
4 |
在本示例中,執行cut函數時,將文本「information」以文本格式CF_TEXT放置到剪切板中,將工程中的位圖資源IDB_BITMAP1以位圖格式CF_BITMAP放置到剪切板中,再定義一個In...  |
巨大八爪鱼 |
1-1 巨大八爪鱼 |
|
551 |
0 |
例如: #include <iostream> using namespace std; int main(void) {... |
巨大八爪鱼 |
1-1 巨大八爪鱼 |
|
379 |
1 |
函數名:CommandLineToArgvW https://msdn.microsoft.com/en-us/library/windows/desktop/bb776391%28v=vs.8... |
巨大八爪鱼 |
1-1 巨大八爪鱼 |
|
387 |
0 |
// vectortest.cpp : Defines the entry point for the console application. // #include "stdafx.h... |
巨大八爪鱼 |
12-29 巨大八爪鱼 |
|
681 |
6 |
https://msdn.microsoft.com/en-us/library/windows/desktop/ff381399%28v=vs.85%29.aspx |
巨大八爪鱼 |
12-29 巨大八爪鱼 |
|
471 |
3 |
詳細信息:https://msdn.microsoft.com/en-us/library/windows/desktop/ff381396%28v=vs.85%29.aspx  |
巨大八爪鱼 |
12-29 巨大八爪鱼 |
|
403 |
2 |
比如說,要想在程序啟動時不顯示窗口,這個在MFC中十分麻煩,甚至搞不好窗口還要閃一下才能隱藏。而在Win32程序中直接強制修改nCmdShow的值就行了,例如: 還有,響應Windows...  |
巨大八爪鱼 |
12-27 巨大八爪鱼 |
|
300 |
0 |
typedef HINSTANCE HMODULE; (把HMODULE定義為HINSTANCE) 再看看HINSTANCE typedef HANDLE HINSTANCE; 那H... |
巨大八爪鱼 |
10-30 巨大八爪鱼 |
|
507 |
8 |
#include <conio.h> // _getch函數所在文件 #include <locale.h> // setlocale函數所在文件 #include...  |
巨大八爪鱼 |
10-30 巨大八爪鱼 |
|