C/C++µÄ64λÕûÐÍ ²»Í¬±àÒëÆ÷¼äµÄ±È½Ï
//ΪÁ˺ÍDSP¼æÈÝ£¬TSint64ºÍTUint64ÉèÖóÉTSint40ºÍTUint40Ò»ÑùµÄÊý
//½á¹ûVCÖл¹ÊÇÈÏΪÊÇ32λµÄ£¬ÏÔÈ»²»ºÏÊÊ
//typedef signed long int TSint64;
//typedef unsigned long int TUint64;
//ANSI CÖй涨long long²ÅÄܱíʾ64λ
//²Î¼û£ºhttp://msdn.microsoft.com/en-us/library/s3f49ktz.aspx
//¿ÉϧVC++ 6.0 ²»ÈÏʶ long long,»á±¨error C2632: 'long' followed by 'long' is illegal
typedef signed long long TSint64;//It's illegal in C90. It's legel in C99.
typedef unsigned long long TUint64;
//typedef LONGLONG TSint64;//VC²»ÈÏ
//typedef ULONGLONG TUint64;
zz from http://www.byvoid.com/blog/c-int64/
ÔÚC/C++ÖУ¬64ΪÕûÐÍÒ»Ö±ÊÇÒ»ÖÖûÓÐÈ·¶¨¹æ·¶µÄÊý¾ÝÀàÐÍ¡£ÏÖ½ñÖ÷Á÷µÄ±àÒëÆ÷ÖУ¬¶Ô64ΪÕûÐ͵ÄÖ§³ÖÒ²ÊDZê×¼²»Ò»£¬ÐÎ̬¸÷Òì¡£Ò»°ãÀ´Ëµ£¬64λÕûÐ͵͍Ò巽ʽÓÐlong longºÍ__int64Á½ÖÖ(VC»¹Ö§³Ö_int64)£¬¶øÊä³öµ½±ê×¼Êä³ö·½Ê½ÓÐprintf(“%lld”,a)£¬printf(“%I64d”,a)£¬ºÍcout << aÈýÖÖ·½Ê½¡£
±¾ÎÄÌÖÂÛµÄÊÇÎåÖÖ³£ÓõÄC/C++±àÒëÆ÷¶Ô64λÕûÐ͵ÄÖ§³Ö£¬ÕâÎåÖÖ±àÒëÆ÷·Ö±ðÊÇgcc(mingw32)£¬g++(mingw32)£¬gcc(linux i386)£¬g++(linux i386)£¬Microsoft Visual C++ 6.0¡£¿ÉϧµÄÊÇ£¬Ã»ÓÐÒ»ÖÖ¶¨ÒåºÍÊä³ö·½Ê½×éºÏ£¬Í¬Ê±¼æÈÝÕâÎåÖÖ±àÒëÆ÷¡£Îª³¹µ×ŪÇ岻ͬ±àÒëÆ÷¶Ô64λÕûÐÍ£¬ÎÒдÁ˳ÌÐò¶ÔËüÃǽøÐÐÁËÆÀ²â£¬½á¹ûÈçÏÂ±í¡£
±äÁ¿¶¨ÒåÊä³ö·½Ê½gcc(mingw32)g++(mingw32)gcc(linux i386)g++(linux i386)MicrosoftVisual C++ 6.0
long long
“%lld”
´íÎó
´íÎó
ÕýÈ·
ÕýÈ·
ÎÞ·¨±àÒë
long long
“%I64d”
ÕýÈ·
ÕýÈ·
´íÎó
´íÎó
ÎÞ·¨±àÒë
__int64
“lld”
´íÎó
´íÎó
ÎÞ·¨±àÒë
ÎÞ·¨±àÒë
´íÎó
__int64
“%I64d”
ÕýÈ·
ÕýÈ·
ÎÞ·¨±à
Ïà¹ØÎĵµ£º
Èç×ªÔØ£¬Çë×¢Ã÷³ö´¦£ºhttp://blog.csdn.net/zhangyang0402/archive/2010/05/01/5549266.aspx
¿ª·¢¹¤¾ß£ºVC ++ 6.0 MASM32
Ò»¡¢__cdeclµ÷Ó÷½Ê½
1£® ÔÚVCÖÐн¨Win32 Console Application, TestASM
2£® н¨test.c
#include<stdio.h>
extern void swap(int * ......
[root@ocsser file]# cat array-05.c
//this is a program for two juzheng xiangcheng.
#include <stdio.h>
int main(){
int i,j,m,n;
int g,k,f;
int c[5][6];
& ......
// SnakeMatrix.cpp : Defines the entry point for the console application.
// Create by Xianyi.Ye, May 4,2010
#include "stdafx.h"
#include <iostream.h>
/*
Question: Print a Sanke Matrix as following
i\j 1 2 3 4 5 6
1 1 2 9 10 25 26
2 4 3 8 11 24 27
3 5 6 7 12 23 28
4 16 15 14 ......
2010Äê05ÔÂ1ºÅ |
23:15·ÖÀࣺ¹ÜÀíά»¤
, Õï¶Ï°¸Àý
| ±à¼
| ±êÇ©£º11g
¡¢dbca
¡¢netca
| 13
views
±¾Îijö×Ô “inthirties£¨ÄÐ
ÈËÈýÊ®£©
”²©¿Í£¬×ªÔØÇëÎñ±Ø×¢Ã÷×÷Õߺͱ£Áô³ö´¦¡£
¿Í»§×°ºÃÁËOracle£¬°²×°³É¹¦ÁË£ ......