{"id":1301,"date":"2014-08-21T21:00:49","date_gmt":"2014-08-21T13:00:49","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=1301"},"modified":"2014-08-21T21:02:01","modified_gmt":"2014-08-21T13:02:01","slug":"vc-%e7%94%9f%e6%88%90%e6%8c%87%e5%ae%9a%e8%8c%83%e5%9b%b4%e5%86%85%e7%9a%84%e9%9a%8f%e6%9c%ba%e6%95%b0%ef%bc%8c%e5%8f%af%e5%a4%a7%e4%ba%8e32767","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/1301","title":{"rendered":"vc++ \u751f\u6210\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u6570\uff0c\u53ef\u5927\u4e8e32767"},"content":{"rendered":"
\r\n\/\/ \u751f\u6210\u968f\u673a\u6570\r\n\/*\r\n\u751f\u6210\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u6570\uff0c\u53ef\u5927\u4e8e32767\r\n*\/\r\nint CxbzqDlg::GetRandNumber2(int nMini,int nMax)\r\n{\r\n\t\/\/\u5f97\u5230nMax\u7684\u4f4d\u957f\u5ea6\uff0c\r\n\tCString strnMax;\r\n\tstrnMax.Format(\"%d\",nMax);\r\n\tCString strRandNumber;\r\n\t\/\/\u968f\u673a\u6570\u7684\u6700\u5927\u8303\u56f4\r\n\tint nBitMax = strnMax.GetLength() ;\/\/\u9650\u5236\u5728 nBitMax \u4e2a 9\u7684\u8303\u56f4\u5185\r\n\t\/\/\u6309\u4f4d\u957f\u5ea6\u5faa\u73af\u751f\u6210\u4e00\u4e2a nBitMax \u4f4d\u7684\u6574\u6570\r\n\tfor(int i = 0 ; inMax)\r\n\t{\r\n\t\tnRes = nRes - nMax;\r\n\t\t\/\/return nRes\r\n\t}\r\n\r\n\treturn nRes;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":" \/\/ \u751f\u6210\u968f\u673a\u6570 \/* \u751f\u6210\u6307\u5b9a\u8303\u56f4\u5185\u7684\u968f\u673a\u6570\uff0c\u53ef\u5927\u4e8e32767 *\/ int CxbzqDlg::GetRandNumber2(int nMini,int nMax) { \/\/\u5f97\u5230nMax\u7684\u4f4d\u957f\u5ea6\uff0c CString strnMax; strnMax.Format(“%d”,nMax); CString strRandNumber; \/\/\u968f\u673a\u6570\u7684\u6700\u5927\u8303\u56f4 int nBitMax = strnMax.GetLength() ;\/\/\u9650\u5236\u5728 nBitMax \u4e2a 9\u7684\u8303\u56f4\u5185 \/\/\u6309\u4f4d\u957f\u5ea6\u5faa\u73af\u751f\u6210\u4e00\u4e2a nBitMax \u4f4d\u7684\u6574\u6570 for(int i = 0 ; i nMax) { nRes = nRes <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,219,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1301"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=1301"}],"version-history":[{"count":2,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1301\/revisions"}],"predecessor-version":[{"id":1303,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1301\/revisions\/1303"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=1301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=1301"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=1301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}