码迷,mamicode.com
首页 >  
搜索关键字:static const    ( 70582个结果
从指定的路径中查找含有特殊字符串的文件
import java.io.*;import java.util.*;import java.util.concurrent.*;public class SearchFile{ public static void main(String ... strings) { final int FI....
分类:其他好文   时间:2014-05-01 13:18:50    阅读次数:253
c#将list集合转换为datatable的简单办法
public static class ExtensionMethods{/// /// 将List转换成DataTable/// /// /// /// public static DataTable ToDataTable(this IList data){PropertyDescriptorC...
分类:其他好文   时间:2014-05-01 13:03:47    阅读次数:355
如何终结服务器进程
windows下面可以主线程while loop接受input;但是觉得很丑。 linux没办法这样,可以用注册信号的办法。实现起来也不难: #include "stdio.h" #include "unistd.h" #include "signal.h" #include "error.h" volatile bool isStop = false; static void handl...
分类:其他好文   时间:2014-04-29 13:42:21    阅读次数:418
C++里面的const和c语言里面的const
众所周知;在C语言里面用const;是可以修改的; //C语言里面可以通过指针修改 int  main() { //可以这么说在C语言中a是一个只读的常量。按照理论我们不好修改// const int a=10; int *p=null; p=(int *)&a;     //但是可以通过地址修改 *p=11; printf("修改之后%d",a); } 这里面的a是...
分类:编程语言   时间:2014-04-29 13:24:21    阅读次数:375
C++ Primer 学习笔记_49_类与数据抽象 --隐含的this指针
类--隐含的this指针引言:    在前面提到过,成员函数具有一个附加的隐含形参,即指向该类对象的一个指针。这个隐含形参命名为this,与调用成员函数的对象绑定在一起。成员函数不能定义this形参,而是有编译器隐含地定义。成员函数可以显式的使用this指针,但不是必须这么做。1、何时使用this指针    有一种情况下,我们必须显式使用this指针:当需要将一个对象作为整体引用而不是引用对象的一...
分类:编程语言   时间:2014-04-29 13:21:21    阅读次数:371
STL源码分析一:组态
#include using namespace std; template class testClass{ public: static int _data; }; int testClass::_data = 1; int testClass::_data = 2; int main() { cout ::_data << endl; cout ::_data << ...
分类:其他好文   时间:2014-04-29 13:21:20    阅读次数:410
poj 2431 Expedition 贪心+最大堆
当油量不够时从走过的油站中选最大加油量的 #include #include #include #include using namespace std; #define MAX_N 10005 struct node{ int dist,fuel; }t[MAX_N]; bool cmp(const node &a,const node &b) { return a.dist<b.dis...
分类:其他好文   时间:2014-04-28 10:44:43    阅读次数:335
【代码备忘】C++ fstream 读写 unicode 文件
欢迎加入我们的QQ群,无论你是否工作,学生,只要有c / vc / c++ 编程经验,就来吧!158427611  所谓的unicode文件,无非就是在文件头部插入了 0xFFFE的标志。。。读写的时候对应的读写 就可以了。 namespace fileStream { bool readFile_Unicode( const string &file ,wstr...
分类:编程语言   时间:2014-04-28 10:22:41    阅读次数:678
java参数传递机制浅析
欢迎转载,转载请声明出处! ----------------------------------------- 前言: java语言中,参数的传递只有一种机制,那就是值传递。 举例: 下面将通过几个例子来说明java中的参数传递机制,这些例子基本涵盖了所有参数传递的情况。 1.基本数据类型: public static void testBase(int i)...
分类:编程语言   时间:2014-04-28 10:11:40    阅读次数:379
C#-访问轰炸机,新建进程,结束进程...(ConsoleApp)---ShinePans
program.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace Tst { class Program { static void Main(string[] arg...
分类:移动开发   时间:2014-04-27 21:35:59    阅读次数:467
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!