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

[ת] C/C++ STL֮remove

http://www.cppreference.com/wiki/cn/stl/algorithm/remove
Óï·¨:
#include <algorithm>
forward_iterator remove( forward_iterator start, forward_iterator end, const TYPE& val );
remove Ëã·¨ÒÆ³ý [start,end) ·¶Î§Ö®ÄÚµÄËùÓÐÓë val ÏàµÈµÄÔªËØ¡£
´Ëº¯ÊýµÄ·µ»ØÖµÊÇÒ»¸öµü´úÆ÷£¬ËüÖ¸Ïò²»°üº¬Óë val ÏàµÈµÄÔªËØµÄÐÂÐòÁеÄ×îºóÒ»¸öÔªËØµÄºóÃæ¡£
×¢ÒâremoveµÄʵÏÖͨ³£²¢²»ÕæµÄ´Ó [start, end) ·¶Î§ÄÚÒÆ³ýÔªËØ£»Èç¹ûÔÚÒ»¸öÈÝÆ÷ÉÏÃæµ÷ÓÃremove£¬ÔÚµ÷ÓÃÖ®ºó´ËÈÝÆ÷µÄ³¤¶È²¢²»»á·¢Éú¸Ä±ä£¨Ö»Í¨¹ýiterators£¬remove²¢²»ÄÜÓ°ÏìÈÝÆ÷µÄ³¤¶È£©£¬ËùÓÐÔªËØ»¹ÊÇÁôÔÚÈÝÆ÷ÄÚ¡£È»¶ø£¬remove½«ËùÓб» “removed” µÄÔªËØ·ÅÔÚÈÝÆ÷µÄβ²¿£¬È»ºó·µ»ØÒ»¸öÇø·Öδ±»É¾³ýºÍ±»É¾³ýÔªËØµÄµü´úÆ÷¡£ÎªÁË´ÓÒ»¸öÈÝÆ÷ɾ³ýÔªËØ£¬ÄãÓ¦¸Ãµ÷ÓôËÈÝÆ÷µÄ erase ·½·¨É¾³ý´Ó·µ»ØµÄµü´úÆ÷£¨iterator£©´¦¿ªÊ¼µÄÔªËØ¡£Õâͨ³£±»ÁªºÏÆðÀ´³Æ×÷£ºerase-remove idiom:
container.erase(remove(container.begin(), container.end(), val), container.end());
(container can be of type vector, string or deque)
remove º¯ÊýµÄʱ¼ä¸´ÔÓ¶ÈÊÇÏßÐԵģ¨linear time£©¡£
Ïà¹Ø»°Ì⣺remove_copy, remove_copy_if, remove_if, unique, unique_copy


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃæ£¬ºóÃæ ......

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸е쬻î»î»î£¡
         &n ......

´î½¨Eclipse C/C++¿ª·¢»·¾³

    ´î½¨eclipse C/C++¿ª·¢»·¾³£º
    1¡¢ÏÂÔØ²¢°²×°Eclipse for C++£ºhttp://www.eclipse.org¡£×îаæÊÇ»ùÓÚEclipse 3.5 galileo£¬ÎļþÃûΪeclipse-cpp-galileo-SR1-win32.zip¡£É蹤×÷Ŀ¼ΪD:\workspace_cpp¡£
    2¡¢eclipse for C/C++ IDEûÓаüº¬C/C++µÄ±àÒëÆ÷ºÍµ÷ÊÔÆ ......

C×Ö·û´®´¦Àíº¯ÊýµÄʵÏÖ£¨Linux£©

C×Ö·û´®´¦Àíº¯ÊýµÄʵÏÖ£¨Linux£©
#include <stddef.h>
char * ___strtok = NULL;

char * strcpy(char * dest,const char *src)
{
char *tmp = dest;

while ((*dest++ = *src++) != '\0')
/* nothing */;
return tmp;
}

char * strncpy(char * des ......

linux 0.11 ÄÚºËѧϰ floppy.c£¬Çý¶¯ÄãµÄÈíÅÌ


/*
 *  linux/kernel/floppy.c
 *
 *  (C) 1991  Linus Torvalds
 */
/*
 * 02.12.91 - Changed to static variables to indicate need for reset
 * and recalibrate. This makes some things easier (output_byte reset
 * checking etc), and means less i ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ