生成UUID

| No Comments | 1 TrackBack


#include <stdio.h>
#include <uuid.h>

main()
{
uuid_t *uuid;
char *s;
uuid = (uuid_t*)malloc(sizeof(uuid_t));
uuidgen(uuid,1);
uuid_to_string(uuid,&s,NULL);
printf("%s\n",s);
}


一个很简单的生成UUID的例子。

1 TrackBack

TrackBack URL: http://www.liukang.com/cgi-bin/mt/mt-tb.cgi/193

似乎在处理>和... Read More

Leave a comment

Google ADs

ClustrMaps

Archives

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.37
Creative Commons License
This blog is licensed under a Creative Commons License.

January 2012

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Kang published on October 7, 2005 10:29 PM.

今天下午效率很高 was the previous entry in this blog.

差点成烤企鹅了 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Google ADs