Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C¼¼ÇÉÊ°ÒÅ~

1. ÔõÑù½¨Á¢ºÍÀí½â·Ç³£¸´ÔÓµÄÉùÃ÷£¿ÀýÈ綨ÒåÒ»¸ö°üº¬N ¸öÖ¸Ïò·µ»ØÖ¸Ïò×Ö·ûµÄÖ¸ÕëµÄº¯ÊýµÄÖ¸ÕëµÄÊý×飿
Õâ¸öÎÊÌâÖÁÉÙÓÐÒÔÏÂ3 ÖÖ´ð°¸:
1. char *(*(*a[N])())();
2. ÓÃtypedef Öð²½Íê³ÉÉùÃ÷:
typedef char *pc;  /* ×Ö·ûÖ¸Õë*/
typedef pc fpc(); /* ·µ»Ø×Ö·ûÖ¸ÕëµÄº¯Êý*/
typedef fpc *pfpc; /* ÉÏÃ溯ÊýµÄÖ¸Õë*/
typedef pfpc fpfpc(); /* ·µ»Øº¯ÊýÖ¸ÕëµÄº¯Êý*/
typedef fpfpc *pfpfpc; /* ÉÏÃ溯ÊýµÄÖ¸Õë*/
pfpfpc a[N]; /* ÉÏÃæÖ¸ÕëµÄÊý×é*/
2. *p++ ×ÔÔöp »¹ÊÇp ËùÖ¸ÏòµÄ±äÁ¿£¿
ºó׺++ ºÍ-- ²Ù×÷·û±¾ÖÊÉϱÈǰ׺һĿ²Ù×÷µÄÓÅÏȼ¶¸ß, Òò´Ë*p++ ºÍ*(p++) µÈ¼Û, Ëü×ÔÔöp ²¢·µ»Øp ×ÔÔö֮ǰËùÖ¸ÏòµÄÖµ¡£Òª×ÔÔöp Ö¸ÏòµÄÖµ, ʹÓÃ(*p)++, Èç¹û¸±×÷ÓõÄ˳ÐòÎ޹ؽôÒªÒ²¿ÉÒÔʹÓÃ++*p¡£
ÍØÕ¹£º
void func()
{
int i = 2;
int j = 5;
int *p = &i;
printf("result :%d\n",*(--p));
}
Êä³ö£º
result :5
Ô­Òò£ºÕ»ÊÇÏòµÍµØÖ·À©Õ¹µÄÊý¾Ý½á¹¹£¡
3.ÔõÑùÅжϻúÆ÷µÄ×Ö½Ú˳ÐòÊǸß×Ö½ÚÔÚÇ°»¹ÊǵÍ×Ö½ÚÔÚÇ°£¿
ÓиöʹÓÃÖ¸ÕëµÄ·½·¨£º
int x = 1;
if(*(char *)&x == 1)
printf("little-endian\n");
else
printf("big-endian\n");


Ïà¹ØÎĵµ£º

ÅжÏC?ÐÐ??¾³µÄ³ÌÐò

/*
**ÅжÏC?ÐÐ??¾³µÄ³ÌÐò
*/
/*
**¾²?³õʼ»¯
*/
int static_variable=5;
void
f()
{
 register int i1, i2, i3, i4, i5, i6, i7, i8, i9, i10;
 register char *c1, *c2, *c3, *c4, *c5, *c6, *c7 , *c8, *c9, *c10;
 extern int a_very_long_name_to_sec_how_long_they_can_be;
 double ......

ÔÚEclipseϵÄC/C++¿ª·¢£¨Eclipse3.2 + CDT 3.1£©


ÒªÈàEclipse ¿ÉÒÔ¿ª·¢ C/C++ ³Ìʽ£¬Òª¹ÒÉÏ CDT ²Å¿ÉÒÔ¡£
 
Ê×ÏÈÒªÏÂÔØCDT
 
CDTµÄ×îа汾ÊÇ 3.1.0£¬ËüÖ§³Öeclipse3.2.0£¬ÆäÏÂÔصØÖ·£ºhttp://download3.eclipse.org/tools/cdt/releases/callisto/dist/3.1.0/£¬»òÕßÊǵ½http://www.eclipse.org/cdt/downloads.phpÏÂÔØÆäËü° ......

C/C++º¯Êý²ÎÊý,´«ÖµÓò´«Ö·!!!

/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê5ÔÂ8ÈÕ, ÏÂÎç2:47
*/
#include <iostream>
using namespace std;
void swap(int x, int y) {
cout << "x and y swap before : " << x << "\t" << y << endl;
int i = x;
x = y;
y = i; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ