VC下Debug和Release区别最近写代码过程中,发现 Debug 下运行正常,Release 下就会出现问题,百思不得其解,而Release 下又无法进行调试,于是只能采用printf方式逐步定位到问题所在处,才发现原来是给定的一个数组未初始化,导致后面处理异常。网上查找了些资料,在这 罗列汇...
分类:
其他好文 时间:
2014-10-10 00:04:07
阅读次数:
270
看效果(gif工具不太会用,效果不是很好)代码很简单,就是对sleep函数和/b的使用。代码 1 #include 2 #include 3 using namespace std; 4 5 int main(int argc, char **argv) 6 { 7 printf("C...
分类:
其他好文 时间:
2014-10-09 20:34:17
阅读次数:
201
1、安装相关组建yuminstallmailxsendmail*chkconfigsendmailonservicesendmailstart2、测试邮件echo"HelloWorld"|mailabc@abc.com3、编辑command.cfg#‘notify-host-by-email‘commanddefinitiondefinecommand{ command_name notify-host-by-email command_line /usr/bin/printf"..
分类:
移动开发 时间:
2014-10-09 20:13:28
阅读次数:
214
本节课的主要内容有:字符串的格式化、连接与分割、比较、匹配和替换、使用正则表达式字符串的格式化:去除空格:trim()使用html格式化:nl2br() 替换‘\n’为‘’ 打印格式化:printf()大小写:strtoupper() strtolower() ucfirst() ucwords(....
分类:
其他好文 时间:
2014-10-09 18:42:27
阅读次数:
198
代码: #include <stdio.h>
#include <stdlib.h>
// C语言将字符常量视为int类型而非char类型
int main(void) {
// sizeof(int) == 4
// sizeof(char) == 1
printf(sizeof(‘ABCD‘) == sizeof(int)? "True" ...
分类:
其他好文 时间:
2014-10-09 17:01:28
阅读次数:
169
逻辑与算符:与或非分别是&&、||、!。核心需要注意的时&&前面如果假,则后面的就不会运算了。||前面为真,则后面的就不会运算了。因为已经知道结果了,所以就省略运算了。...
分类:
其他好文 时间:
2014-10-09 16:20:48
阅读次数:
698
1.函数作为参数加*和不加*
例1:
void print(int i)
{
printf("not parameter%d\n",i);
}
void debugfun(void (*funprint)(int))
{
funprint(2);
return;
}
main()
{
debug...
分类:
编程语言 时间:
2014-10-09 16:18:18
阅读次数:
190
代码: #include?<stdio.h>
#include?<stdlib.h>
#include?<stdbool.h>
//?C语言保证逻辑表达式是从左至右求值
int?main(void)?{
//?printf("Left")?==?4
//?printf("Right")?==?5
if?(!pri...
分类:
其他好文 时间:
2014-10-08 02:59:54
阅读次数:
222
1 #include 2 3 int square137(int n); 4 5 void p137() { 6 double x = 3.0; 7 int y = (int)x; 8 printf("Square of %f is %d\n", x, square1...
分类:
其他好文 时间:
2014-10-08 01:41:54
阅读次数:
175
设置1:build project的时候,让编译器支持 三字母词。
项目文件右击--> Properties-->C/C++ Build--> Settings 如图设置:
再 Command line pattern 如图的位置加上 -ansi 或者 -trigraphs 即可。
现在可以尝试下 加 和 不加 这个参数下面代码的执行效果: printf("delete files? ...
分类:
编程语言 时间:
2014-10-07 19:34:23
阅读次数:
222