cº¯ÊýµÄ²ÎÊý´«µÝ
ÔÚCÓïÑÔÖУ¬ËùÓд«µÝ¸øº¯ÊýµÄ²ÎÊý¶¼Êǰ´Öµ´«µÝµÄ¡£
#include <iostream>
using namespace std;
void Out(int* p)
{
int j = 11;
p = &j;
*p = 12;
cout<<*p<<endl;
}
int main(int argc,char*argv[])
{
int i = 10;
Out(&i);
cout<<"i="<<i<<endl;
cin>>i;
}
Ïà¹ØÎĵµ£º
µÚÒ»Õ µ¼ÑÔ
1£¬¶¨Òå(define)ÓëÉùÃ÷(declaration)
¶¨Òå±íʾ´´½¨±äÁ¿»ò·ÖÅä´æ´¢µ¥Ôª£»¶øÉùÃ÷Ö¸µÄÊÇ˵Ã÷±äÁ¿µÄÐÔÖÊ£¬µ«²»·ÖÅä´æ´¢µ¥Ôª¡£
µÚ¶þÕ ÀàÐÍ¡¢ÔËËã·ûºÍ±í´ïʽ
1£¬Êý¾ÝÀàÐͼ°³¤¶È
CÖÐÖ»ÓÐ4ÖÖ»ù±¾Êý¾ÝÀàÐÍ£ºchar ,int ,float ......
ÓÉÓÚC++±àÒëÆ÷ÐèÒªÖ§³Öº¯ÊýµÄÖØÔØ£¬»á¸Ä±äº¯ÊýµÄÃû³Æ£¬Óë±ê×¼CÖк¯ÊýÃû³Æ²»Í¬¡£È»¶ødllµÄµ¼³öº¯Êýͨ³£ÊDZê×¼C¶¨ÒåµÄ£¬Èñê×¼C±àдµÄdllº¯Êý¶¨ÒåÔÚCºÍC++±àÒëÆ÷϶¼ÄܱàÒëͨ¹ý£¬Í¨³£»áʹÓÃÒÔϵĸñʽ£º£¨Õâ¸ö¸ñʽÔںܶà³ÉÊìµÄ´úÂëÖкܳ£¼û£©
#ifdef __cplusplus extern "C"
{
#endif
// ......
µÚÒ»´Î×ÐϸµØ¿´ÕâÖÖ´úÂ룬¶¼ÊÇ´ÓÍøÉϸ´ÖÆ×öÁËÂÔ΢¸Ä¶¯ºóµÄ²úÎï¡£´úÂëÈçÏ£º
#include "reg52.h"
unsigned char Count;
sbit Xiang=P1^2 ; //·äÃùÆ÷Ïì
unsigned char code SONG[] ={
0x26,0x20,0x20,0x20,0x20,0x20,0x26,0x10,0x20,0x10,0x20,0x80,0x26,0x20,0x30,0x20,
0x30,0x20,0x39,0x10,0x30,0x10,0x30,0x80,0x2 ......
1.10.3£¬voidÖ¸Õë
¡¾¹æÔò 1-35¡¿Ç§ÍòСÐÄÓÖСÐÄʹÓÃvoidÖ¸ÕëÀàÐÍ¡£
°´ÕÕ ANSI(American National Standards Institute)±ê×¼£¬²»ÄÜ¶Ô voidÖ¸Õë½øÐÐËã·¨²Ù×÷£¬¼´ÏÂÁвÙ×÷¶¼ÊDz»ºÏ·¨µÄ£º
void * pvoid;
pvoid++; //ANSI£º´íÎó
pvoid += 1; //ANSI£º´íÎó
ANSI ±ê×¼Ö®ËùÒÔÕâÑùÈ϶¨£¬ÊÇÒòΪËü¼á³Ö£º½øÐÐËã·¨²Ù×÷µÄÖ¸Õë±ØÐëÊ ......
Python 3 Êä³öÖØ¶¨ÏòʹÓÃC/C++
By:gddsky
Ä¿±ê
Ï£Íû½«Python 3µÄÊä³öÖØ¶¨Ïòµ½×Ô¶¨ÒåµÄÊä³öÄ¿±ê¡£
ºËÐÄ
PythonʹÓÃsys.stdout¡¢sys.stderr×öÊä³öÄ¿±ê£¬Ö»ÒªÎÒÃÇÌæ»»ÕâÁ½¸öÖµ¾Í¿ÉÒÔÖØ¶¨Ïòµ½ÎÒÃÇ×Ô¶¨ÒåÄ¿±ê¡£Ìæ»»µÄÖµµÄ¹æÔòÔÚPythonµÄÎĵµÖÐsys (module)µÄsys.stdoutÉÏÃæËµÃ÷Ö»ÒªÌí¼ÓÒ»¸öwriteº¯Êý¾Í¿ÉÒÔ ......