C/C++Í·ÎļþÒ»ÀÀ
C/C++
Í·ÎļþÒ»ÀÀ
//////////////////////////////////////////////////////////////////////////
C
Í·Îļþ
(C89,C95)
(C++98,C++03Ò²°üº¬)
include <assert.h>¡¡¡¡¡¡¡¡//Õï¶Ï¿â
include <ctype.h>¡¡¡¡¡¡¡¡ //×Ö·û´¦Àíº¯Êý¿â
include <errno.h>¡¡¡¡¡¡¡¡ //´íÎó¶¨Òå
include <float.h>¡¡¡¡¡¡¡¡ //¸¡µãÊý´¦Àí
include <iso646.h> //¶ÔÓ¦¸÷ÖÖÔËËã·ûµÄºê
include <limits.h>¡¡¡¡¡¡¡¡//¶¨Òå¸÷ÖÖÊý¾ÝÀàÐÍ×îÖµµÄ³£Á¿
include <locale.h>¡¡¡¡¡¡¡¡//¶¨Òå±¾µØ»¯Cº¯Êý
include <math.h>¡¡¡¡¡¡¡¡¡¡//¶¨ÒåÊýѧº¯Êý
include <setjmp.h> //Òì³£´¦ÀíÖ§³Ö
include <signal.h> //ÐźŻúÖÆÖ§³Ö
include <stdarg.h> //¿É±ä²ÎÊýÁбíÖ§³Ö
include <stddef.h> //³£Óó£Á¿
include <stdio.h>¡¡¡¡¡¡¡¡ //¶¨ÒåÊäÈ룯Êä³öº¯Êý
include <stdlib.h>¡¡¡¡¡¡¡¡//¶¨ÒåÔÓÏÊý¼°ÄÚ´æ·ÖÅ亯Êý
include <string.h>¡¡¡¡¡¡¡¡//×Ö·û´®´¦Àí
include <time.h>¡¡¡¡¡¡¡¡¡¡//¶¨Òå¹ØÓÚʱ¼äµÄº¯Êý
include <wchar.h>¡¡¡¡¡¡¡¡ //¿í×Ö·û´¦Àí¼°ÊäÈ룯Êä³ö
include <wctype.h>¡¡¡¡¡¡¡¡//¿í×Ö·û·ÖÀà
--------------------------------------------
C
Í·Îļþ
(C99Ôö¼Ó)
#include
<complex.h>
¡¡
¡¡
//
¸´Êý´¦Àí
#include
<fenv.h>
¡¡¡¡¡¡
¡¡
//
¸¡µã»·¾³
#include
<inttypes.h>
¡¡
¡¡
//
ÕûÊý¸ñʽת»»
#include
<stdbool.h>
¡¡
¡¡
//
²¼¶û»·¾³
#include
<stdint.h>
¡¡
¡¡¡¡
//
ÕûÐÍ»·¾³
#include
<tgmath.h>
¡¡
¡¡¡¡
//
ͨÓÃÀàÐÍÊýѧºê
//////////////////////////////////////////////////////////////////////////
´«Í³
C++
Í·Îļþ
(C++98
֮ǰ)
include
<fstream.h>¡¡¡¡¡¡ //¸ÄÓÃ<fstream>
include
<iomanip.h>¡¡¡¡¡¡ //¸ÄÓÃ<iomainip>
include
<iostream.h>¡¡¡¡¡¡//¸ÄÓÃ<iostream>
include
<strstrea.h>¡¡¡¡¡¡//¸ÃÀ಻ÔÙÖ§³Ö£¬¸ÄÓÃ<sstream>ÖеÄstringstream
------
Ïà¹ØÎĵµ£º
LinuxÏÂC++¿ª·¢¹¤¾ß½éÉÜ
¡¡¡¡¸ÅÊö
¡¡¡¡¾ÍC£«£«¿ª·¢¹¤¾ß¶øÑÔ£¬ÓëWindowsÏÂ΢Èí£¨VC£¬ VS2005µÈ£©Ò»Í³ÌìÏÂÏà±È£¬Linux/UnixÏÂC£«£«¿ª·¢£¬¿ÉνÎ廨°ËÃÅ£¬¸÷ʽ¸÷Ñù¡£Emacs, vi, eclipse, anjuta£¬kdevelopµÈ²ã³ö²»Çî¡£
¡¡¡¡WindowsÏ£¬¿ª·¢¹¤¾ß¶àÒÔ¼¯³É¿ª·¢»·¾³IDEµÄÐÎʽչÏÖ¸ø×îÖÕÓû§¡£ÀýÈ磬VS2005¼¯³ ......
#include<stdio.h>
#define N 8
void input(int n,int p[N][N])
{
int i,j;
for(i=0;i<n;i++)
{
printf("please input the %d line:\n",i+1);
for(j=0;j<n;j++)
{
scanf("%d",&p[i][j]);
}
}
}
void output(int n,int p[N][N])
......
Àý) Σ険¤Ê¥³ー¥Ç¥£¥ó¥°
1 char cStr[256];
2 ZeroMemory(cStr, sizeof(cStr));
3 &nb ......
1. ÔõÑù½¨Á¢ºÍÀí½â·Ç³£¸´ÔÓµÄÉùÃ÷£¿ÀýÈ綨ÒåÒ»¸ö°üº¬N ¸öÖ¸Ïò·µ»ØÖ¸Ïò×Ö·ûµÄÖ¸ÕëµÄº¯ÊýµÄÖ¸ÕëµÄÊý×飿
Õâ¸öÎÊÌâÖÁÉÙÓÐÒÔÏÂ3 ÖÖ´ð°¸:
1. char *(*(*a[N])())();
2. ÓÃtypedef Öð²½Íê³ÉÉùÃ÷:
typedef char *pc; /* ×Ö·ûÖ¸Õë*/
typedef pc fpc(); /* ·µ»Ø×Ö·ûÖ¸ÕëµÄº¯Êý*/
typedef fpc *pfpc; /* ÉÏÃ溯ÊýµÄÖ¸Õë*/ ......
1) goto
goto Ö»ÄÜÔÚÒ»¸öº¯ÊýÄÚÌøת¡£½¨ÒéÉÙÓã¬Ê¹µÃ³ÌÐòά»¤ÆðÀ´ÈÝÒ׳ö´í£»µ«ÊÇ£¬ÔÚÓжà¸öÑ»·Çé¿öÏÂÌøת£¬ÓÐʱÓÃgoto¿ÉÒÔʹµÃÎÊÌâ±äµÃ¼òµ¥¡£
class A
{
public:
A(){}
~A(){}
};
&nbs ......