码迷,mamicode.com
首页 >  
搜索关键字:void    ( 62627个结果
Java 文件读写示例1
//StringBuffer常用于字符串追加,插入,删除import java.io.*;public class IOFile {static File f=new File("test.txt");static int count=0;public static void main(String...
分类:编程语言   时间:2015-11-29 21:02:06    阅读次数:140
无根树转有根树的一般方法
紫书:P352#include #include #include using namespace std;int p[100];vector G[100]; //邻接表int n;void read_tree(){ int u,v; cin>>n; for(int i=0;i>...
分类:其他好文   时间:2015-11-29 19:26:22    阅读次数:156
OpenCV颜色直方图
#include "stdafx.h"void myShowHist(IplImage* image1,IplImage* image2);IplImage* cvShowHist(IplImage* src);int main(){ //对彩色图像进行均衡化 IplImage * image=.....
分类:其他好文   时间:2015-11-29 18:09:14    阅读次数:159
ASP.net封装
设计如下:代码:using System;using System.IO;public partial class 四则运算 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { }...
分类:Web程序   时间:2015-11-29 18:00:51    阅读次数:140
udp program
UDP programUDP常用函数:recvfrom和sendtorecvfromssize_t recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr * from, socklen_t *addrlen);s...
分类:其他好文   时间:2015-11-29 13:31:58    阅读次数:184
利用模板实现c++智能指针
#include "std_lib_facilities.h"using namespace std;class Point//used for test{ public: Point(double xval,double yval):x(xval),y(yval) { } void set_x(....
分类:编程语言   时间:2015-11-29 11:59:15    阅读次数:131
多线程之:线程同步代码块
java中使用关键字synchronized进行线程同步,有四中同步块: 1、实例方法 2、静态方法 3、实例方法中的同步块 4、静态方法中的同步块实例方法同步:在方法申明中使用synchronized 关键字,同步在拥有该方法的对象上1 public synchronized void...
分类:编程语言   时间:2015-11-29 11:58:37    阅读次数:143
多线程--毕向东java基础教程视频学习笔记
多线程运行的安全问题例子:售票系统 1 class Ticket implements Runnable 2 { 3 //定义静态变量ticket 4 private static int ticket=100; 5 public void run() 6 { 7 ...
分类:编程语言   时间:2015-11-29 00:57:14    阅读次数:153
多线程中Local Store Slot(本地存储槽)[转]
1. 使用ThreadStatic特性 ThreadStatic特性是最简单的TLS使用,且只支持静态字段,只需要在字段上标记这个特性就可以了: [ThreadStatic] static string str = "hehe"; static void Main() { //另一个线程只会修改自己...
分类:编程语言   时间:2015-11-29 00:51:35    阅读次数:190
typedef 和 const
1. typedef 允许你为各种数据类型定义新名字#include typedef char *ptr_to_char; //这让我看起来,好奇怪,不好读void main(){ char a = 'c'; //char *b = &a; ptr_to_char b; b = &a; printf...
分类:其他好文   时间:2015-11-28 21:36:34    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!