
——VC
EmbededCoder
C, Python, C++, Qt, MCU, RTOS, ARM Cortex-M, Linux
展开
-
基于VS2010MFC获取当前串口及串口热插拔
自己开发一个串口通信应用,运行时需要检测当前PC机上有多少个串口,设备插入或者拔出时都能在Combo Box中显示出来,下面将进行以下汇总: 在对话框的OnInitDialog函数内做如下操作 BOOL COnshowDlg::OnInitDialog() { CDialogEx::OnInitDialog(); // 将“关于...”菜单项添加到系统菜单中。 ...转载 2019-10-16 14:13:00 · 956 阅读 · 0 评论 -
Windows下获取当前时间函数汇总
(1)使用C标准库(精确到秒级): #include <time.h> #include <stdio.h> int main( void ) { time_t t = time(0); char tmp[64]; strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A 本年第%j天 %z",localtime(&t) ); puts...转载 2019-10-16 14:11:20 · 851 阅读 · 0 评论 -
MFC工程使用控制台输出调试信息
在MFC程序中,可以使用TRACE宏或者OutPutDebugString()函数输出调试信息,TRACE宏可以在调试时像Output窗口输出调试信息,OutPutDebugString()函数的输出则可以用DebugView捕获(DebugView也可以捕获TRACE宏的输出,其官网在这里,具体使用请参考官网的说明),另外也可以通过AfxMessageBox()或者MessageBox(...转载 2019-05-08 18:25:26 · 1220 阅读 · 0 评论 -
windows UDP简单实例
client: //client: #include <stdio.h> #include <winsock2.h> #pragma comment(lib,"ws2_32.lib") #define BUF_SIZE 1024 #define PORT_ 9411 int main(void) { WSADATA wsd;...转载 2019-05-06 21:13:46 · 1302 阅读 · 0 评论 -
the code execution cannot proceed because api-ms-win-core-console-l1-2-0.dll was not found....问题
在windows下用 getchar getch getche,莫名的报错the code execution cannot proceed because api-ms-win-core-console-l1-2-0.dll was not found.... 写个程序,真是什么问题都能遇到,遇到一个问题解决了还有下一个问题等着你,解决了这个问题再去解决下一个问题吧。 解决方法:...原创 2019-07-24 14:36:56 · 14909 阅读 · 0 评论 -
error C3861: “snprintf”: 找不到标识符
在使用VSS编译C++程序时,当调用stdio.h库时,比如调用以下函数: snprintf(args,sizeof(args), "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64, dec_ctx->time_base.den, dec_ctx->sample_rate, av_get_...转载 2019-09-07 19:08:49 · 2571 阅读 · 0 评论