extern "C"
CºÍC++»¥Ïàµ÷Óú¯Êýʱ£¬Ê¹ÓÃextern "C"¡£
ÔÒò£º
C²»Ö§³Öº¯ÊýÖØÔØ£¬¶øC++Ö§³Öº¯ÊýÖØÔØ¡£º¯Êý±»C++±àÒëºó»áÃû×ÖÓëCÓïÑÔ²»Í¬¡£¼ÙÉèijº¯ÊýÔÐÍΪfoo(ing x, int y)£¬±»C++±àÒëºóÃû×ÖΪ_foo_int_int£¬¶øC±àÒëÆ÷±àÒëºóÃû×ÖΪ_foo¡£
Ïà¹ØÎĵµ£º
3.2 ¸ßЧÂʲâÊÔ£ºËÄÁ½°Îǧ½ï
ÉÏÒ»½Ú½éÉÜÁËһЩËÆÊǶø·ÇµÄ¸ßЧÂÊ·½·¨£¬ÄÇô£¬ÔõÑù²ÅÄÜÕæÕý¸ßЧÂʲâÊÔÄØ£¿ÕæÕýµÄ¸ßЧÂÊ£¬²»ÄܺöÂÔÈ˵ÄÖÇ»ÛÕâÒ»¹Ø¼üÒòËØ¡£
ÓÉÓÚ¹¤¾ß²»¿ÉÄÜ×Ô¶¯Á˽â´úÂëµÄÉè¼Æ¹¦ÄÜ£¬Ö»ÓÐÈ˲ÅÁ˽⣬Òò´Ë£¬Ö»ÓÐÈ˵ÄÖǻۼ°Ê±½éÈ룬¹¤¾ß²ÅÄÜ×öÕýÈ·µÄÊÂÇ飬²ÅÄÜ´ïµ½ÕæÕýµÄ¸ßЧÂÊ¡£
&nb ......
/*
title£ºÔ¼Éª·òÎÊÌâµÄÑ»·Á´±í½â·¨
author£ºcoolsky600
date£º2010 04 22
notice£ºcÓïÑÔ ÃæÏò¹ý³Ì
*/
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int num; //È«¾Ö±äÁ¿Î§È¦ÈËÊý
int out; & ......
/*
============================================================================
Name : test.c
Author : alf
Version :
Copyright : Your copyright notice
  ......
×î½üÔÚ¿´¡¶c³ÌÐòÉè¼ÆÓïÑÔ¡·£¬¾ÍÊÇÄDZ¾±»ÓþΪCÓïÑÔÊ¥¾µÄÊé¼®¡£¼¸Ìì¿´ÁËÒ»Õ£¬¸Ð´¥ºÜ´ó£¬¿ªÆª¾ÍÉæ¼°µ½ºÜ¶àʵÓóÌÐò£¬²»ÏñÌ·ºÆÇ¿ÄÇÑùÈÃÈËÉîÏÝÓ﷨ϸ½ÚÖ®ÖУ¬¶øÇÒѧÍêÌ·µÄÊé¸Ð¾õʲô¶¼²»ÄÜ×ö¡£ºÜ¶àÎÊÌâÌ·¶¼»Ø±ÜÁË¡£Ëùνרҵ¿´¿´c³ÌÐòÉè¼ÆÓïÑԵĴúÂëµÄ·ç¸ñ¾ÍÄܸÐÊܵ½£¬Ò»ÖÖ¾«Ðĵñ×ÁµÄÒÕÊõÆ·¡£µÚÒ»ÕÂÓÐ ......
extern cµÄ×÷Óá¾×ª¡¿
2009-12-18 13:10
1.ÒýÑÔ
C++ÓïÑԵĴ´½¨³õÖÔÊÇ“a better C”£¬µ«ÊÇÕâ²¢²»Òâζ×ÅC++ÖÐÀàËÆCÓïÑÔµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýËù²ÉÓõıàÒëºÍÁ¬½Ó·½Ê½ÓëCÓïÑÔÍêÈ«Ïàͬ¡£×÷ΪһÖÖÓûÓëC¼æÈݵÄÓïÑÔ£¬C++±£ÁôÁËÒ»²¿·Ö¹ý³Ì ʽÓïÑÔµÄÌص㣨±»ÊÀÈ˳ÆΪ“²»³¹µ×µØÃæÏò¶ÔÏ󔣩£¬Òò¶øËü¿ÉÒÔ¶¨Òå²»ÊôÓ ......