ANSI CÓ¦ÓóÌÐòÉè¼Æ
1£¬´«Öµµ÷ÓÃ
ÿ¸öʵ²Î¶¼ÊÇÒ»¸ö±í´ïʽ£¬¶¼ÓÐÒ»¸öÖµ¡£Í¨¹ý¸´ÖƱí´ïʽֵµÄ·½Ê½£¬½«Æä´æ´¢ÔÚÒ»¸öÁÙʱµ¥ÔªÖУ¬²¢°Ñ¶ÔÓ¦µÄÐÎʽ²ÎÊý×÷ΪÕâ¸öµ¥ÔªµÄ±êʶ·û¡£¸Ã´«µÝʵ²Î·½·¨±»³Æ×÷´«Öµµ÷Óá£call by value
2£¬Ô¤´¦ÀíÆ÷
±àÒëÆ÷°Ñ³ÌÐòת»»ÎªÄ¿±ê´úÂë֮ǰÏÈÓÉCÔ¤´¦ÀíÆ÷´¦ÀíÔ´Îļþ¡£
CÔ´´úÂë->Ô¤´¦ÀíÆ÷->±àÒëÆ÷
Ô¤´¦ÀíÆ÷Ö´ÐгÌÐòÔ±°²ÅŵÄÔ¤´¦ÀíÖ¸ÁÕâЩָÁîÒÔ#¿ªÍ·¡£
Ô¤´¦ÀíÃüÁî¿ÉÒÔ³öÏÖÔÚº¯Êý¶¨ÒåÀïÃ棬Ҳ¿ÉÒÔ³öÏÖÔÚº¯Êý¶¨ÒåÍâÃæ¡£
±ØÐëÀμǣ¬Ô¤´¦ÀíÆ÷½ö½ö°´×ÖÃæÒâÒåÖ´ÐÐÔ¤´¦ÀíÃüÁÆä²¢²»Çå³þCÓïÑÔµÄÓï·¨ºÍÓïÒå¡£
#include <stdio.h>
ÔÚ²Ù×÷ϵͳÒÑ֪Ŀ¼ÖÐÑ°ÕÒ¸ÃÎļþ£¬¿É°üº¬Èκαê׼ͷÎļþ£¬Ò²¿É°üº¬×Ô¼º±àдµÄÍ·Îļþ¡£±»°üº¬ÎļþµÄÎļþÃû¿ÉÒÔÊÇÈÎÒâµÄ¡£
#include "mydefs.h"
ÔÚ¹¤×÷Ŀ¼ÖÐÑ°ÕÒ±»°üº¬Îļþ
ÿ¸ö±ê×¼CÓïÑÔϵͳÌṩÈô¸É¸öº¯Êý¿â£¬Ò²ÌṩÈô¸É¸öÍ·Îļþ¡£ÕâЩͷÎļþʹÓû§¿ÉÒÔ·½±ãµØʹÓÃÉÏÊöº¯Êý¿â¡£
3£¬´ø²ÎÊýµÄºê
ÕâЩ²ÎÊýÏ൱ÓÚʵ¼Ê²ÎÊýµÄռλ·ûplaceholder
ºêµÄÃû×ÖºÍ×óÀ¨ºÅÖ®¼ä²»ÔÊÐíÓпոñ£¬ºêÃûºÍÀ¨ºÅÖ®ºóÊǺêÌå¡£Ô¤´¦ÀíÆ÷°Ñÿ´Î³öÏÖµÄÕâ¸öºê¶¼Ìæ»»³É¶ÔÓ¦µÄºêÌå¡£
Ïà¹ØÎĵµ£º
ÎÞÒâÖз³öÁËNÄêǰдµÄµÝ¹é-»ØËÝ·¨Çó½â8»ÊºóÎÊÌ⣬¸É´âÈûµ½²©¿ÍÖаɡ£
#include <stdio.h>
#include <conio.h>
#include <math.h>
#define QUEENS 8
// ¼Ç¼½âµÄÐòºÅµÄÈ«¾Ö±äÁ¿¡£
int iCount = 0;
// ¼Ç¼»ÊºóÔÚ¸÷ÁÐÉϵķÅÖÃλÖõÄÈ«¾ÖÊý×é¡£
int Site[QUEENS];
// µÝ¹éÇó½âµÄº¯Êý¡£
void Q ......
1,³ÌÐò¿ØÖÆÖеĿØÖÆÁ÷Óï¾äÓÃÓÚ¿ØÖƸ÷¼ÆËã»ú²Ù×÷Ö´ÐеĴÎÐò¡£
ʲôÊÇ¿ØÖÆÁ÷Óï¾äÏëÁË°ëÌ죬ÔÀ´²»¹ýÊÇÕâЩ£¬if-elseÓï¾ä£¬else-ifÓï¾ä£¬switchÓï¾ä£¬whileÑ»·£¬forÑ»·£¬do-whileÑ»·µÈ¡£
2,»¨À¨ºÅ{}£¬ÆäÖеÄÓÒ»¨À¨ºÅÓÃÓÚ½áÊø³ÌÐò¿é£¬Æäºó²»ÐèÒª·ÖºÅ¡£
µ±³õÒ»¿´µ½“Æäºó²»ÐèÒª·ÖºÅµÄ”ʱºòÏëÁË°ëÌ ......
Ê×ÏÈ¿´ÏÂÏÂÃæÕâ¶Î£º
int main()
{
char *name = "fengkewei";
char name1[] = "fengkewei";
char *name2 = "fengkewei";
char *name3 = "woaifengkewei";
int i = 10;
int j = 10;
int k = 11;
return 0;
}
ÈôÄú¾õµÃËüÃÇÓ¦¸Ã¶¼±£´æÔÚÄÚ´æÖеÄÒ»¿éµØ·½£¬ÄÇÇëÍùÏ¿´¡£¡£¡£¡£
ÏÂÃæÊDZàÒëÆ÷Ϊ¸÷¸ö±äÁ¿·ÖÅäµÄÄÚ´æµØ ......
ºÍÔÚIDEÖбàÒëÏà±È£¬ÃüÁîÐÐģʽ±àÒëËٶȸü¿ì£¬²¢¿ÉÒÔ±ÜÃâ±»IDE²úÉúµÄһЩ¸½¼ÓÐÅÏ¢Ëù¸ÉÈÅ¡£±¾ÎĽ«½éÉÜ΢ÈíC/C++±àÒëÆ÷ÃüÁîÐÐģʽÉ趨ºÍÓ÷¨¡£ 1¡¢ÉèÖû·¾³±äÁ¿£º PATH=C:\Program Files\Microsoft Visual Studio 8\VC\bin INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\include LIB=C:\Program Files\Microsof ......