Linux c/c++ ¿ª·¢¹¤¾ß¼¯½õ
ÎÒ֮ǰÊÇÒ»¸öC³ÌÐòÔ±£¬¶øÇÒÊǸöWindowsµÄ³ÌÐòÔ±£¬ÔÚwindowsÏÂʹÓÃVC6.0/VS2005µÈmicrosoftµÄɵ¹Ïʽ¹¤¾ß¹¤×÷£¬
¶ÔÓÚÄǸövc 6.0/vs2005µÄ¿ì½Ý²Ù×÷£¬debug²Ù×÷ÊÇÄÇôµÄÊìϤ£¬¿ÉÒÔ˵vc
6.0/vs2005ÊÇwindowÏ¿ª·¢c/c++×îºÃÓõŤ¾ßÁË£¬¿ÉÒԲ鿴µ÷ÓöÑÕ»£¬ÄÚ´æ±ä»¯Çé¿ö£¬±äÁ¿Öµ£¬ÁíÍâ°²×° visual assist
xºóÈÃVC¿´ÆðÀ´ÊÇÄÇôµÄÍêÃÀ¡£
µ«ÊÇwindowsÏÂд³É´úÂëµ½ÁËlinuxÏÂÊÇÓÐÎÊÌâµÄ£¬ËùÒÔ½¨ÒéÔÚvcÖн«¹¤¾ß-¡·Ñ¡Ïî—¡·ÖƱí·û—¡·ÖƱí·û´óС4£¬²åÈë¿Õ¸ñ£¬ÁíÍâµÄÎÊÌâ¾ÍÊÇ
ÄǸö»Ø³µ»»ÐеÄÎÊÌ⣬ÀýÈçwindowsÏÂÊÇ0d,0a£¬µ½ÁËlinuxÏÂÓÃvi¿´µ½µÄ¶¼ÊÇ^M£¬¸ø±ðÈË´øÀ´²»±ã£¬ËùÒÔÈç¹ûÌá½»µÄ·þÎñÆ÷ÊÇlinux£¬¶ø
ÄãÊÇÔÚwindowsÏ¿ª·¢£¬¿ÉÒÔÔÚsvn/cvsÖнøÐÐÉèÖ㬾ͿÉÒÔ×Ô¶¯½øÐÐdos2unixµÄת»»£¬Ïà¹ØµÄÎĵµ¿ÉÒԲ鿴svn/cvsµÄÏà¹ØÊֲᣬÆä
Öж¼ÓÐÕâÑùµÄÉèÖá£
ÓÐÐÒÕâ´ÎÎÒתµ½ÁËLinuxÏ¿ª·¢£¬ÓÐÐÒÈÏʶÁËlinux£¬µ«ÊÇËæÖ®¶øÀ´µÄ¾ÍÊÇÌرðÍ·ÌÛµÄÎÊÌ⣺LinuxÏÂʹÓÃʲô¹¤¾ß½øÐбàÂ룬±à
Ò룬debugÄØ£¿£¿ÎҸе½·Ç³£µÄÃÔ㣬Ȼºó¾ÍÊÇÍøÉÏ´óËÑË÷£¬¿´µ½ÄÇô¶àµÄÍøÓÑÍƼöVIMʱ£¬ÎÒʧÍûÁË£¬ÌرðµÄʧÍû£¬È»ºóÓÃVIMÇÃÁËÒ»¸öÏÂÎ磬ÀÛµÄÊÖµÄ
ÂéÁË£¬¸Ðµ½ÌرðµÄ²»Ë¬£¬¾ÍÏñÊÇÓÃ×óÊÖÄÿê×ÓÒ»Ñù£¬È«ÉíµÄÁ¦Á¿ÎÞ·¨Ê©Õ¹£¬ËùÒÔ
ÎÒ»¹ÊǼƻ®ÔÙÕÒÕÒ¿´¡£²»¹ýºóÀ´ÎÒ»¹ÊÇÕÒµ½ÁËÊʺÏ×Ô¼ºµÄ¹¤¾ß¡£ºÇºÇ£¬ÕæÊÇÌ«¸ßÐËÁË£¬½ñÌì°ÑÎÒ×Ô¼ºÕ⼸ÌìËѼ¯µÄһЩ×ÊÁÏÕûÀíһϣ¬¸øÒÔºóתÏòlinuxµÄ³ÌÐò
Ô±Ò»µãÌáʾ°É!
Ö÷ÒªµÄ¹¤¾ßÈçÏ£º
1. vim + ctags + taglist + cscope + cppcomplete + global
Õâ¸öÎÒÒ²ÊÔ¹ýÁË£¬±È½ÏÓÐÓõÄÌû×ÓÈçÏ£º
http://www.linuxsir.org/bbs/showthread.php?t=241578
http://blog.csdn.net/wooin/archive/2007/10/31/1858917.aspx
µ«ÊÇÕâ¸öÒª¼Ç´óÁ¿µÄÃüÁ²»¹ý»¹ºÃ£¬ÕâЩÃüÁîÓÐÁ½ÈýÌì¾Í¿ÉÒÔ¼ÇסÁË£¬
ÎÒÕâÀïÓиö¼òµ¥µÄ²á×Ó£º
2¡¢Îı¾µÄ²Ù×÷
~
:e! file1 ÔÚµ±Ç°Îļþϱà¼ÐµÄÎļþ
:r /etc/passwd
ʵÏÖÎļþµÄ¶ÁÈ빦ÄÜ
:wq ±£³Ö²¢Í˳ö
:q! Ç¿ÐÐÍ˳ö
O £ºÖØÆðÒ»ÐÐ
U£º³·Ïú £º C-R £ºÖØ×ö
dd ɾ³ýÒ»ÐÐ d$ɾ³ýÐкóµÄ
e:Òƶ¯µ¥´Ê ge ß----- --à e
%:À¨ºÅÆ¥Åä
33G£ºÌøµ½33ÐÐ
gg :Ìøµ½µÚÒ»ÐÐ
C-O /C-IÀ´»ØÌøת
H –HOME L –last
ma :¶¨Òå±êÇ© a£¬‘a:»Øµ½a
C-VÎı¾¿é²Ù×÷
/\Æ¥ÅäÕû¸öµ¥´Ê £ºn ÏÂÒ»¸ö
yy :¸´ÖÆÒ»ÐУ¬p:Õ³Ìù
^ ½«¹â±ê¿ìËÙÌøתµ½±¾ÐеÄÊ×ÐÐ×Ö·û
$ ½«¹â±ê¿ìËÙÌøתµ½±¾ÐеÄÐÐβ×Ö·û
:m,ny
¸´ÖƵÚ
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
1 ´´½¨C# DLL£¬ÐèÒªÖ¸¶¨Ó¦ÓÃÀàÐÍΪ“Àà¿â”£¬´úÂ룺
namespace CSLib
{
public class Class1
{
private string name;
public string Name
......
ÖÚËùÖÜÖª£¬strcmpΪ×Ö´®±È½ÏÖ»Ó㬼òµ¥µÄº¯Êý²¢²»¼òµ¥¡£
ÏÂÃæµÄ´úÂë
int main()
{
char* cp1 = {'z', 'h', 'a', 'n', 'g'};
char* cp2 = {'z', 'h', 'a', 'n', 'g'};
std::cout<<strcmp(cp1, cp2)<< ......
ÄÚ´æ¿ØÖÆƪ
calloc
free
getpagesize
malloc
mmap
munmap
calloc£¨ÅäÖÃÄÚ´æ¿Õ¼ä£©
Ïà¹Øº¯Êý
malloc£¬free£¬realloc£¬brk
±íÍ·Îļþ
#include <stdlib.h>
¶¨Ò庯Êý
void *calloc(size_t nmemb£¬size_t size);
º¯Êý˵Ã÷
calloc()ÓÃÀ´ÅäÖÃnmemb¸öÏàÁÚµÄÄڴ浥λ£¬Ã¿Ò»µ¥Î»µÄ´óСΪsize£¬²¢·µ»ØÖ¸ÏòµÚ ......