码迷,mamicode.com
首页 >  
搜索关键字:assert    ( 2161个结果
POJ 3126 Prime Path (BFS)
【题目链接】click here~~ 【题目大意】给你n,m分别是素数,求由n到m变化的步骤数,规定每一步只能改变个十百千一位的数,且变化得到的每一个数也为素数 【解题思路】和poj 3278类似,bfs+queue,分别枚举个十百千的每一位就可以了,不过注意个位只能为奇数,且千位从1开始 代码: //poj 3126 #ifndef _GLIBCXX_NO_ASSERT #include...
分类:其他好文   时间:2015-07-19 11:54:31    阅读次数:131
画图3
void CXuexi2View::OnDraw(CDC* pDC){ CXuexi2Doc* pDoc = GetDocument(); ASSERT_VALID(pDoc); CString str; str="www.baidu.com"; // CString str("http...
分类:其他好文   时间:2015-07-17 20:57:34    阅读次数:110
assert()
原文:http://www.cnblogs.com/ggzss/archive/2011/08/18/2145017.htmlassert宏的原型定义在中,其作用是如果它的条件返回错误,则终止程序执行,原型定义:#include void assert( int expression ); ass....
分类:其他好文   时间:2015-07-17 18:16:52    阅读次数:90
GetDlgItem() 出现错误
写MFC程序ASSERT(IsWindow(pTemp->m_hWnd))报错   CRect rect; CWnd *pWnd = GetDlgItem(IDC_picture);//IDC_picture为picture控件ID pWnd->GetClientRect(&rect);//rc为控件的大小。 int x=rect.Height(); int y=rect.Width()...
分类:其他好文   时间:2015-07-16 20:02:42    阅读次数:240
assert()函数用法总结
assert宏的原型定义在中,其作用是如果它的条件返回错误,则终止程序执行,原型定义:#include void assert( int expression ); assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调....
分类:其他好文   时间:2015-07-16 11:20:28    阅读次数:89
算法导论——朴素字符串匹配算法
package org.loda.string; import org.junit.Assert; /** * * @ClassName: NaiveStringMatcher * @Description: 朴素字符串查找 * * text:abcabaabcabac * pattern:abaa...
分类:编程语言   时间:2015-07-13 12:28:20    阅读次数:138
CodeForces 158 B. Taxi(模拟)
【题目链接】click here~~ 【题目大意】n组团体去包车,每组团体的人数《=4,一辆车最多容纳4人,求所求车的数目最小 【解题思路】:思路见代码~~ // C #ifndef _GLIBCXX_NO_ASSERT #include #endif #include #include #include #include #include #include #include...
分类:其他好文   时间:2015-07-12 12:49:21    阅读次数:104
单线程和多线程在pc上执行花费时间测试
1 package Thread; 2 3 import junit.framework.Assert; 4 import org.junit.Test; 5 6 import java.util.concurrent.CountDownLatch; 7 import java....
分类:编程语言   时间:2015-07-12 00:12:19    阅读次数:146
LAMP里php.ini配置文件详解
路径:/usr/local/php/etc/php.iniphp用“;”作为“注释”符号,shell用“#”作为“注释”符号;编辑php.ini[root@LAMPLINUX~]#vim/usr/local/php/etc/php.ini1.查询/disable_functions设置禁用函数disable_functions=eval,assert,popen,passthru,escapeshellarg,escapeshellc..
分类:Web程序   时间:2015-07-11 18:46:06    阅读次数:148
【c++】简单的string类的几个基本函数
// string的几个基本函数的实现 #include #include #include using namespace std; class String { public: String() { _str = new char[1]; _str[0] = '\0'; } String(char *str) { assert(str != NULL); _...
分类:编程语言   时间:2015-07-11 15:10:37    阅读次数:151
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!