Questions in category: C++ (C++)
软件 >> C++
<[1] [2] [3] [4] >

11. .pdb 文件是什么?

Posted by haifeng on 2021-12-08 11:08:35 last update 2021-12-08 11:10:11 | Answers (0) | 收藏


.pdb 是程序数据库文件.    program database

 

 

参考

调试之pdb文件(C++)_HITXuQin的专栏-CSDN博客_c++ pdb 调试

12. 快速幂运算

Posted by haifeng on 2021-06-22 11:56:24 last update 2021-06-22 11:56:24 | Answers (0) | 收藏


快速幂运算

 

 

References:

Fast Power Algorithm - Exponentiation by Squaring - C++ and Python Implementation | Rookie's Lab (rookieslab.com)

 

13. 依次执行若干条命令, 使用 C++ 实现

Posted by haifeng on 2021-04-24 19:49:43 last update 2021-04-24 19:49:43 | Answers (0) | 收藏


每条命令以分号作为分隔符. 依次执行.

14. 16进制转成十进制

Posted by haifeng on 2021-04-11 12:00:26 last update 2021-04-11 12:02:03 | Answers (0) | 收藏


写一个程序, 将十六进制转为十进制、八进制、二进制

例如: 0x7d674d7b

 

U++Framework/upp/uppsrc/Core/Stream.h 中有一个 Magic() 函数, 其中将 magic 设置为此数值.

void      Magic(dword magic = 0x7d674d7b);

15. getche()

Posted by haifeng on 2021-03-02 13:55:04 last update 2021-03-02 13:55:04 | Answers (0) | 收藏


严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C4996 'getche': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _getche. See online help for details. studentsMS D:\work\cs\c++\database\StudentsMangementSystem\studentsMS\studentsMS\studentsMS.cpp 59

 

 

16. c++ 中 unsigned int 与 unsigned short int

Posted by haifeng on 2020-11-23 15:32:20 last update 2020-11-23 15:35:40 | Answers (0) | 收藏


 unsigned short int a=4294967295,b=a+1;//定义短整型无符号
 printf("a=%u\nb=%u\n",a,b);//以无符号输出

 

此时输出:

a=65535
b=0

将上面的 unsigned short int 改为 unsigned int, 则输出:

a=4294967295
b=0

 

改为 unsigned long int, 结果也一样. 注意此时输出格式符为 %lu

unsigned long int a=4294967295,b=a+1;//定义短整型无符号
printf("a=%lu\nb=%lu\n",a,b);//以无符号输出


 

>> 2^32
in> 2^32

out> 4294967296

因此, unsigned int 及 unsigned long int 占用四个字节.

 

17. stdlib.h 中的 rand() 函数在哪里定义

Posted by haifeng on 2019-03-14 12:33:32 last update 2019-03-14 12:33:32 | Answers (0) | 收藏


stdlib.h 中的 rand() 函数在哪里定义

18. 判断某年是否是闰年

Posted by haifeng on 2019-03-03 12:27:35 last update 2019-03-03 12:27:35 | Answers (0) | 收藏


int IsLeapYear(int year)
{
    return ( year%4==0 && year%100!=0 ) || ( year%400 == 0 );
}

19. C++ GUI 库

Posted by haifeng on 2019-02-16 23:09:22 last update 2019-02-16 23:55:30 | Answers (0) | 收藏


GTKmm

https://www.gtkmm.org/

  • 适用于 Linux

 

JUCE

https://juce.com/

  • Free/paid

 

Ultimate++

https://www.ultimatepp.org/

 

wxWidgets

https://www.wxwidgets.org/

  • Free

 

<[1] [2] [3] [4] >