Dev-C++可用的Ping函數
摘要:SyntaxParametersIpAddress [in]Return Value- true - 有ping到- false - 沒ping到ping.hping.cpp就這樣以上程式碼我只有修改成可以編譯執行原程式碼不是我寫的
阅读全文
structure - "." & "->"
摘要:編譯器:DEV-C++之前都誤以為『 . 』跟『->』是差不多的但是根據實驗宣告的是structure,用『 . 』。宣告的是point structure,用『->』。下面是範例記得!point structure要規劃一塊記憶體位置給他用!!
阅读全文
C 複製字串的小現象
摘要:根據說明#include <string.h>char * strncpy ( char * destination, const char * source, size_t num );有趣的來了所有的範例都是用char arraychar destination[]char source[]我使用的是dev c++如果把兩個都宣告成為char*執行的時候就會看到存取錯誤但是 destination 宣告為char array source 宣告為 char*也是可以的
阅读全文
WSAAsyncSelect 失敗 error code 10022
摘要:根據MSDN10022:Invalid argument但是我個人案例是將 socket 設定變成副程式,執行的時候發生的錯誤。把 socket 設定放回 WM_CREATE 就正常了。同理,WM_PAINT也有類似的狀況。
阅读全文
TCP console server & client
摘要:server/*************************** Server ********************/// Module Name: Server.c// Description:// This example illustrates a simple TCP server that accepts// incoming client connections. Once a client connection is// established, a thread is spawned to read data from the// client and echo it
阅读全文
DEV C++ 指標初始化
摘要:int *p = NULL;int *p;p = NULL;一個下午的血淚教訓
阅读全文
Serial Port RS-232 in C with WINAPI 實作篇
摘要:這次終於成功寫出來簡易console版本有實際上跟設備連接側試過編譯工具:Dev-C++註解沒有,詳情請洽MSDN!別人都只講長篇大論,至少我還有一個可以用的完整可以看。
阅读全文
動態調用DLL
摘要:一言以蔽之==== in DLL header file ======== in cpp file ====以上是在dev c++裡編譯成功的語法。--超過了一行
阅读全文
DEV C++ WINAPI CreateWindowEx 固定視窗大小
摘要:CreateWindowEx ( 0, /* Extended possibilites for variation */ szClassName, /* Classname */ "Windows App", /* Title Text */ WS_CAPTION, /* default window */ CW_USEDEFAULT, /* Windows decides the position */ CW_USEDEFAULT, /* where the window ends up on the screen */ 800, /* The programs wid
阅读全文