¼ÇÒ»µÀC±ÊÊÔÌ⣬¸÷ÖÖâ«Ëö½â·¨¡£
ÉùÃ÷£º´ËÎĵĸ÷ÖÖâ«Ëö½â·¨×ª×Ôµç×Ó¿Æ´óÄÚÍøÂÛ̳£¬¶Ô£¬¾ÍÊÇ×î½üÒò”ÐíÔ¸ÃÅ“¶øÉϸ÷´óÐÂÎÅÍøÕ¾µÄѧУ¡£
ÌâÄ¿ÈçÏ£º
#include "stdio.h"
void print()
{
*
}
void main()
{
}
ÒªÇóÔÚ*ºÅ´¦Ìí¼ÓÓï¾ä£¬³ÌÐòÊä³öhello,world!
ºÃÁË£¬ÎÒÖ±½ÓÌù´ð°¸ÁË£¬ÏàÐÅ´ó¼Ò¶¼¿´µÃ¶®£¬ÓÐЩʵÔÚÊÇâ«Ëö¡£¡£¡£Ò²»¶Ó´ó¼Ò²¹³ä£º
//â«Ëö×¢ÊÍÁ÷
#include “stdio.h”
void print()
{
}
void main(){puts(“HelloWorld”);}
/*
}
void main()
{
}
//â«Ëö#defineÁ÷
#include “stdio.h”
void print()
{
#define main main(){printf(“Hello World!\n”);} void empty
}
void main()
{
}
//â«ËöAPIÁ÷¡£
#include “stdio.h”
void print()
{
#pragma comment(linker,”/entry:print”)
#pragma comment(lib,”kernel32.lib”)//¼ÓÉÏÕâ¾ä£¬ÃâµÃijЩXX˵ÎÒâ«Ëö
#define HANDLE unsigned long
#define WINAPI __stdcall
#define DWORD unsigned long
#define BOOL unsigned long
#define STD_OUTPUT_HANDLE ((DWORD)-11)
DWORD dw=0;
HANDLE WINAPI GetStdHandle(DWORD nStdHandle);
BOOL WINAPI WriteFile(HANDLE hFile,void *lpBuffer,DWORD nNumberOfBytesToWrite,DWORD* lpNumberOfBytesWritten,HANDLE *lpOverlapped);
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),”Hello,world!\n”,sizeof(“Hello,world!\n”),&dw,NULL);
}
void main()
{
}
//â«Ëö¹¹Ô캯ÊýÁ÷£¨/* */ÀïµÄÄÚÈݾÍÊÇ*µÄÄÚÈÝ£©
#include "stdio.h"
void print()
{
/*
}
class cls{
public:
cls(){
printf("hello world\n") ;
}
} ;
cls mycls ;
void fun(){
*/
}
void main()
{
}
OVERÁË¡£¡£µç×Ó¿Æ´óѧÉúÊÇâ«Ëö£¬µ«ÊDZ»Ã½Ìå³´³ÉÄÇÑù£¬GGÃÇÖ»ÄÜЦ¶ø²»Óï¡£
Ïà¹ØÎĵµ£º
ÓÉÓÚVC±àÒëÆ÷Óк¯ÊýÖØÃüÃûµÄ¹¦ÄÜËùÒÔ£¬È·¶¨º¯ÊýÃûÓÐÁ½ÖÖ·½Ê½£º
1.extern "C"
2.ʹÓÃ.defÎļþ
ÕâÁ½ÖÖÒ²¿ÉÒÔÒ»ÆðʹÓá£
ÏÂÃæÊÇÒ»¸öÀý×Ó£º
extern "C" _declspec(dllexport)int __stdcall JieCheng(int a)
{//½×³Ëº¯Êý¡£ÊäÈë:ÕýÕûÊý¡£Êä³ö:Õâ¸öÊýµÄ½×³ËÖµ
int b=1;
for(int i=1;i<=a;i++)
{
&n ......
http://blog.chinaunix.net/u1/41817/showart_342390.html
6£®5
ÔõÑù½«×Ö·û´®´òÓ¡³ÉÖ¸¶¨³¤¶È
?
Èç¹ûÒª°´±í¸ñÐÎʽ´òÓ¡Ò»×é×Ö·û´®£¬Äã¾ÍÐèÒª½«×Ö·û´®´òÓ¡³ÉÖ¸¶¨³¤¶È¡£ÀûÓÃ
printf()º¯Êý¿ÉÒԺܷ½±ãµØʵÏÖÕâÒ»µã£¬Çë¿´ÏÂÀý
......
À´×ÔÒ»±¾¾ø°æµÄÊé,ËäȻûÓк¯Êý
ÃèÊö,µ«ÊÇ×îÆðÂë¿ÉÒÔÖªµÀ·ÖÀà,¾Í¿ÉÒÔÈ¥ man ÁË
Linux Cº¯Êý¿â²Î¿¼ÊÖ²á
µÚ1ÕÂ×Ö·û²âÊÔ
º¯Êý
isalnum(²âÊÔ×Ö·ûÊÇ·ñΪӢÎÄ×Öĸ»òÊý×Ö)
isalpha(²âÊÔ×Ö·ûÊÇ·ñΪӢÎÄ×Öĸ)
isascii(²âÊÔ×Ö·ûÊÇ·ñΪASCIIÂë×Ö·û)
isblank(²âÊÔ×Ö·ûÊÇ·ñΪ¿Õ¸ñ×Ö·û)
iscntrl(²âÊÔ×Ö·ûÊÇ·ñΪASCIIÂëµÄ¿ØÖÆ×Ö·û ......
C++ÌṩµÄ±àÒëÔ¤´¦Àí¹¦ÄÜÖ÷ÒªÓÐÒÔÏÂÈýÖÖ£º
¡¡¡¡£¨Ò»£© ºê¶¨Òå
¡¡¡¡£¨¶þ£© Îļþ°üº¬
¡¡¡¡£¨Èý£© Ìõ¼þ±àÒë
¡¡¡¡ÔÚC++ÖУ¬ÎÒÃÇÒ»°ãÓÃconst¶¨Òå·ûºÅ³£Á¿¡£ºÜÏÔÈ»£¬ÓÃconst¶¨Òå³£Á¿±ÈÓÃdefine¶¨Òå³£Á¿¸üºÃ¡£
¡¡¡¡ÔÚʹÓú궨ÒåʱӦעÒâµÄÊÇ£º
¡¡¡¡£¨a£© ÔÚÊéд#define ÃüÁîʱ£¬×¢Òâ<ºêÃû>ºÍ<×Ö·û´®>Ö®¼äÓÿո ......