浅析C/C++中的switch/case陷阱 先看下面一段代码:
文件main.cpp#includeusing namespace std;int main(int argc, char *argv[]){ int a
=0; switch(a) { case ...
分类:
编程语言 时间:
2014-05-19 07:08:14
阅读次数:
429
控制焦点Focus on Control 的取值:Alternative
fragment(denoted “alt”) 与 if…then…else对应Option fragment (denoted “opt”) 与
Switch对应Parallel fragment (denoted “par...
分类:
其他好文 时间:
2014-05-17 22:05:02
阅读次数:
298
在进行IP地址字符串与网络字节序转换时,应用inet_pton,inet_ntop函数,这两个函数对IPv4和IPv6都适用;而inet_aton,inet_ntoa,inet_addr只适用于IPv4,应该少用。
分类:
其他好文 时间:
2014-05-17 21:47:13
阅读次数:
264
描述 给Hyper-V创建两块网卡备用 步骤: 1
打开Hyper-V,在右侧Action栏,单击Virtual Switch Manager… 2 依次选择New Virtual network switch
| Internal | Create Virtual Switch 3 指定Name为...
分类:
其他好文 时间:
2014-05-17 18:26:05
阅读次数:
299
IPv4和IPv6****************************************************************************************************IPv4缺陷IPv6特征全局可达性端到端通信(无NAT)容易聚合自动配置即插即用报头更简单IPv6地址************************************************************..
分类:
其他好文 时间:
2014-05-16 02:16:43
阅读次数:
306
IPV6的优势1.更大地址空间,IPV6采用了128bit的地址长度,可以提供2^128个地址。2.IPV6包头长度为固定40个字节,IPV4是40~60个字节;这样容易实现硬件式转发,提高转发效率3.IPV6包头比IPV4包头简化,取消了网络层的校验工作,提高了网络层效率4.引入灵活的扩展头,使得IPV6的..
分类:
其他好文 时间:
2014-05-15 18:51:42
阅读次数:
1066
Beforewetalkaboutthedifferencesbetweenthesenetworkdevices,wehavetounderstandtheconflictdomainandbrocastdomainfirst.Takebusnetworktopologyforexample,allthePCsareconnectingtothesamebusline.IfmultiplePCsaresendingthesignalatthesametime,itwillcreateaconflictdom..
分类:
Web程序 时间:
2014-05-15 18:48:26
阅读次数:
381
重启交换机,按住mode键。flash_initswitch:dirflash:switch:renameflash:config.textflash:config.oldswitch:bootWouldyouliketoentertheinitialconfigurationdialog?[yes/no]:noSwitch>enSwitch#renameflash:config.oldflash:config.textDestinationfilename[config.text]..
分类:
其他好文 时间:
2014-05-15 12:46:02
阅读次数:
279
1.在函数中用return将返回值传递给调用者。在全局作用域中使用return,则中止脚本运行。2.变量函数,实际上就是将函数名付给一个变量$func,之后变量后加一个括号就代表调用了原来的函数functioncome(){echo‘北京‘;}$func="come";$func();3.rand(min,max)生成在min和max之间的..
分类:
Web程序 时间:
2014-05-15 01:05:35
阅读次数:
375
switch 语句int x = 10switch(x) case
1:print(“sfsd”)breakcase 2:print(“dsdf”)breakdefaultprint(“right”)break
分类:
其他好文 时间:
2014-05-14 23:47:11
阅读次数:
263