Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C/C++×Ö·û´®Æ¥ÅäºÍÌæ»»

ÌâÄ¿£ºÊäÈëÈý¸ö×Ö·û´®a£¬bºÍc£¬½«aÖÐbµÄµÚÒ»´Î³öÏÖÌ滻Ϊc¡£
´úÂ룺
#include <iostream.h>
#include <string.h>
/*×Ö·û´®Ìæ»»£¬µÚÒ»¸ö²ÎÊýΪԭ´®£¬µÚ¶þ¸ö²ÎÊýΪҪƥÅäµÄ×Ó´®
µÚÈý¸ö²ÎÊýΪҪÌæ»»µÄµÚÒ»¸ö×Ó´®Öаüº¬µÚ¶þ¸ö×Ó´®µÄ²¿·Ö*/
char *strReplace(char *str1,char *str2,char *str3);
void main()
{
       char str1[255]={'\0'},str2[255]={'\0'},str3[255]={'\0'};
       cin>>str1;
       cin>>str2;
       cin>>str3;
       strcpy(str3,strReplace(str1,str2,str3));
       cout<<str3<<endl;
}
/*×Ö·û´®²éÕÒÆ¥Å亯Êý£¬²éÕÒµÚ¶þ¸ö×Ö·û´®ÔÚµÚÒ»¸ö×Ö·û´®ÖеÄλÖÃ*/
//ÌÎÌÎÈÏΪ×Ô¼ºÐ´µÄÕâ¸ö×Ö·û´®Æ¥Å亯Êý»¹ÊǺÜÓÐʹÓüÛÖµµÄ£¬ÕýÔÚѧϰ
int strSearch(char *str1,char *str2)
{
       int at,flag=1;
       if (strlen(str2) > strlen(str1))
       {
           at = -1;
       }
       else if (!strcmp(str1,str2))
       {
           at = 0;
       }
       else
       {
            unsigned i=0,j=0;
            for (i=0;i < strlen(str1)&&flag;)
           {
                  for (j=0;j < strlen(str2)&&flag;)
                 {
   &


Ïà¹ØÎĵµ£º

C¿É±ä²ÎÊýº¯Êý ʵÏÖ

 Cº¯ÊýÒªÔÚ³ÌÐòÖÐÓõ½ÒÔÏÂÕâЩºê:
void va_start( va_list arg_ptr, prev_param );
type va_arg( va_list arg_ptr, type );
void va_end( va_list arg_ptr );
va_list:ÓÃÀ´±£´æºêva_start¡¢va_argºÍva_endËùÐèÐÅÏ¢µÄÒ»ÖÖÀàÐÍ¡£ÎªÁË·ÃÎʱ䳤²ÎÊýÁбíÖеIJÎÊý£¬±ØÐëÉùÃ÷
      & ......

C/C++Öеİ´Öµµ÷ÓÃÓë°´ÒýÓõ÷ÓÃ

 Ðí¶à±à³ÌÓïÑÔÖеĵ÷Óú¯ÊýµÄÁ½ÖÖ·½·¨ÊÇ°´Öµµ÷ÓÃ(call-by-value)ºÍ°´ÒýÓõ÷ÓÃ(call-by-reference)¡£
²ÎÊý°´Öµµ÷Óô«µÝʱ£¬Éú³É²ÎÊýÖµ¸±±¾²¢ÇÒ´«¸ø±»µ÷Óú¯Êý£¬¸±±¾µÄ¸Ä±ä²¢²»Ó°Ïìµ÷ÓÃÕßµÄԭʼ±äÁ¿Öµ£¬ÕâÑù¾Í¿ÉÒÔ·ÀÖ¹ÒâÍâµÄ¸±×÷ÓÃÓ°Ï쿪·¢ÕýÈ·£¬¿É¿¿µÄϵͳ¡£°´Öµµ÷ÓõÄÒ»¸öȱµãÊÇ£¬Èç¹û´«µÝ½Ï´óµÄÊý¾ÝÏÔò¸´ÖÆÕâ¸öÊý ......

ÑòÈÞ±»ÓþΪ¡°Èí½ð×Ó¡±Ò²³ÉB¶þCµÄÍØ»ÄÕß

ÑòÈÞ±»ÊÇÒÔɽÑòÈÞΪԭ²ÄÁÏÕëÖ¯Îï¶ø³ÉµÄ´²ÉÏÓÃÆ·,ÒÀ¾ÝÉ´ÏßÖÖÀà·Ö³É´Ö·Ä֯ƷºÍ¾«·ÄÕëÖ¯ÎïÁ½ÖÖ,ÒÀ¾ÝÔ­²ÄÁϱÈÖµ¿ÉÒԷֳɴ¿ÑòÈÞ¼°ÑòÈÞ»ì·ÄÁ½ÖÖ¾­¼Ó¹¤¶ø³ÉµÄÉú»îÓÃÆ·£¬¹©Å¯ÐԺ㬸Ç×ÅÊæ̹£¬¾¡ÏԸߵµ¾×½À¡£ ±¾ÎÄÀ´Ô´£º¸ÊËàÇìÑôÌÚ´ïÉÌó ......

CÏÝÚå&ȱÏÝ

 1.1= Óë  ==
Àý1£º
±¾ÀýÖÐÑ­»·Óï¾äµÄ±¾ÒâÊÇÌø¹ýÎļþÖеĿոñ·û¡¢ÖƱí·û¡¢»»Ðзû
while(c=''||c=='\t'||c=='\n')
 c=getc(f);
c= ''||c=='\t'||c=='\n'
ËÀÑ­»·
Àý2£º
if((filedesc==open(argv[i],0))<0)
 error();
ÓÀÔ¶²»»á±»µ÷ÓÃ
1.2 & ºÍ | ²»Í¬ÓÚ&& ºÍ||
 
1.3 CÓ ......

C±ê×¼¿âº¯Êý

º¯ÊýÃû: abort
¹¦  ÄÜ: Òì³£ÖÕÖ¹Ò»¸ö½ø³Ì
Óà ·¨: void abort(void);
³ÌÐòÀý:
#include <stdio.h>
#include <stdlib.h>
 
int main(void)
{
  printf("Calling abort()\n");
  abort();
  return 0; /* This is never reached */
}
 
 
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ