C/C++±àÒëÆ÷ cl.exeµÄÃüÁîÑ¡Ïî
ºÍÔÚ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\Microsoft Visual Studio 8\VC\lib Èç¹ûÌáʾÕÒ²»µ½mspdb80.dllÎļþ£¬Ôò´ÓC:\Program Files\Microsoft Visual Studio 8\Common7\IDEÏ¿½±´¡°msobj80.dll,mspdb80.dll,mspdbcore.dll,mspdbsrv.exe¡±ÕâËĸöÎļþµ½C:\Program Files\Microsoft Visual Studio 8\VC\binϼ´¿É¡£ 2¡¢ÃüÁîÑ¡Ï 1) /C:ÔÚÔ¤´¦ÀíÊä³öÖб£Áô×¢ÊÍÓï¾ä 2) /c:Ö»±àÒ룬²»Á¬½Ó£¬Ï൱ÓÚÔÚ"Build"²Ëµ¥ÏÂÑ¡ÔñÁË"Compile" 3) /D:¶¨Òå³£Á¿ºÍºê£¬ÓëÔ´³ÌÐòÀïµÄ#define ÓÐÏàͬЧ¹û 4) /E:Ô¤´¦ÀíC¡¢C£«£«Ô´Îļþ£¬½«Ô´ÎļþÖÐËùÓеÄÔ¤±àÒëÖ¸Áî¼°ºêÕ¹¿ª£¬½«×¢ÊÍÈ¥µô£¬È»ºó½«Ô¤´¦ÀíÆ÷µÄÊä³ö¿½±´ÖÁ±ê×¼Êä³öÉ豸Êä³ö£¬²¢ÇÒÔÚÿ¸öÎļþµÄ¿ªÍ·ºÍĩβ¼ÓÈë#line 5) /EH:Ö¸¶¨±àÒëÆ÷ÓúÎÖÖÒì³£´¦ÀíÄ£ÐÍ 6) /EP:ͬ/E,Ö»ÊÇÈ¥µôÁË#line 7) /F:ÉèÖóÌÐòµÄ¶ÑÕ»´óС 8) /FA:ÉèÖÃÉú³ÉºÎÖÖÁбíÎļþ£¨»ã±à¡¢»ã±àÓë»úÆ÷Âë¡¢»ã±àÓëÔ´Âë¡¢»ã±àÓë»úÆ÷ÂëÒÔ¼°Ô´Â룩 9) /Fa:Ö¸¶¨ÓÃ/FAÉèÖõÄÁбíÎļþµÄ´æ·Å·¾¶¼°£¨»ò£©ÎļþÃû 10) /FD:Éú³ÉÎļþµÄÏ໥ÒÀÀµÐÅÏ¢ 11) /Fd:ÉèÖóÌÐòÊý¾Ý¿âÎļþ£¨PDB£©µÄ´æ·Å·¾¶¼°£¨»ò£©ÎļþÃû 12) /Fe:ÉèÖÃ×îÖÕ¿ÉÖ´ÐÐÎļþµÄ´æ·Å·¾¶¼°£¨»ò£©ÎļþÃû 13) /FI:Ô¤´¦ÀíÖ¸¶¨µÄÍ·Îļþ£¬ÓëÔ´ÎļþÖеģ£includeÓÐÏàͬЧ¹û 14) /Fm:´´½¨mapÎļþ 15) /Fo:ÉèÖñàÒëºóObjÎļþµÄ´æ·Å·¾¶¼°£¨»ò£©ÎļþÃû 16) /Fp:ÉèÖÃÔ¤±àÒëÎļþ£¨pch£©µÄ´æ·Å·¾¶¼°£¨»ò£©ÎļþÃû 17) /FR:Éú³Éä¯ÀÀÐÅÏ¢£¨sbr£©Îļþ 18) /Fr:ͬ/FR,²»Í¬Ö®´¦ÔÚÓÚ/Fr²»°üÀ¨¾Ö²¿±äÁ¿ÐÅÏ¢ 19) /G3:Ϊ80386´¦ÀíÆ÷ÓÅ»¯´úÂëÉú³É 20) /G4:Ϊ80486´¦ÀíÆ÷ÓÅ»¯´úÂëÉú³É 21) /G5:ΪPentium´¦ÀíÆ÷Ó
Ïà¹ØÎĵµ£º
´´½¨Ð½ø³Ì£ºforkº¯Êý
1.1.1. forkº¯Êý¸Éʲô£¿
#include <sys/types.h>
#include <unistd.h>
pid_t fork(void);
‘fork()’º¯ÊýÓÃÓÚ´ÓÒÑ´æÔÚ½ø³ÌÖд´½¨Ò»¸öнø³Ì¡£Ð½ø³Ì³ÆΪ×Ó½ ......
1,³ÌÐò¿ØÖÆÖеĿØÖÆÁ÷Óï¾äÓÃÓÚ¿ØÖƸ÷¼ÆËã»ú²Ù×÷Ö´ÐеĴÎÐò¡£
ʲôÊÇ¿ØÖÆÁ÷Óï¾äÏëÁË°ëÌ죬ÔÀ´²»¹ýÊÇÕâЩ£¬if-elseÓï¾ä£¬else-ifÓï¾ä£¬switchÓï¾ä£¬whileÑ»·£¬forÑ»·£¬do-whileÑ»·µÈ¡£
2,»¨À¨ºÅ{}£¬ÆäÖеÄÓÒ»¨À¨ºÅÓÃÓÚ½áÊø³ÌÐò¿é£¬Æäºó²»ÐèÒª·ÖºÅ¡£
µ±³õÒ»¿´µ½“Æäºó²»ÐèÒª·ÖºÅµÄ”ʱºòÏëÁË°ëÌ ......
ÔÚc++ primeÊéÖп´µ½¹ý£¬ÔÚDLLºÍlibÖп´µ½¹ý£¬µ«ÊÇÿ´Î¿´¹ý¾Í²»ÇóÉõ½âµØһɨ¶ø¹ý¡£ÐÄÀïÖªµÀÓÐextern cÕâ¸öÓï¾ä£¬È´²»ÖªµÀ¸ÃÓÃÔÚÄÄÀÓÖÄÜÆðµ½Ê²Ã´×÷Óᣰ¦£¬ÏëÏë×Ô¼ºÒ²ËãÊÇд¹ý²»ÉÙCODEµÄÈËÁË£¬¿ÉÕâÖÖÑÛ¸ßÊֵ͵Ä벡ȴ´Óû¸Ä±ä¹ý¡£½ñÌìͻȻÏëÆðexternÕâ¸ö¹Ø¼ü×Ö£¬Ëì¾ö¶¨²»ÄÜÔÙÕâôÀË ......
Ê×ÏÈ¿´ÏÂÏÂÃæÕâ¶Î£º
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àÒëÆ÷Ϊ¸÷¸ö±äÁ¿·ÖÅäµÄÄÚ´æµØ ......