读书人

怎样确定二维字符创数组的大小解决思路

发布时间: 2012-02-21 16:26:23 作者: rapoo

怎样确定二维字符创数组的大小
char* RegString[]={
"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\AppMgmt"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\Base"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\Boot Bus Extender"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\Boot file system"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\CryptSvc"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\DcomLaunch"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\dmadmin"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\dmboot.sys"
,"Driver"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\dmio.sys"
,"Driver"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\dmload.sys"
,"Driver"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\dmserver"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\EventLog"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\File system"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\Filter"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\HelpSvc"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\Netlogon"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\PCI Configuration"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\PlugPlay"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\PNP Filter"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\Primary disk"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\RpcSs"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\SCSI Class"
,"Driver Group"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\sermouse.sys"
,"Driver"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\sr.sys"
,"FSFilter System Recovery"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\SRService"
,"Service"

,"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Minimal\\System Bus Extender"
,"Driver Group"};
像这种 二维字符串数组
怎么确定它的字符串个数
还有 把以上的二维字符串 改成用string[] 创建 怎么确定大小

[解决办法]
string[]创建的话,大小是:sizeof(RegString)/sizeof(std::string)

读书人网 >C++

热点推荐