当前位置: 首页 > news >正文 做网站先做ue品牌推广多少钱 news 2025/10/23 23:34:00 做网站先做ue,品牌推广多少钱,网站建设网络推广平台,媒体资源网官网1、vector里面放多种参数。在C中#xff0c;如果你想要在std::vector中存储不同类型的参数#xff0c;你可以使用std::any#xff08;C17及以上#xff09;或std::variant#xff08;C17以前的版本需要使用Boost库或者C17及以上标准#xff09;。以下是使用std::vector中如果你想要在std::vector中存储不同类型的参数你可以使用std::anyC17及以上或std::variantC17以前的版本需要使用Boost库或者C17及以上标准。以下是使用std::vectorstd::any的例子 #include iostream #include vector #include anyint main() {std::vectorstd::any vec;vec.push_back(42);vec.push_back(hello);vec.push_back(3.14);for (const auto item : vec) {if (item.type() typeid(int)) {std::cout std::any_castint(item) std::endl;}else if (item.type() typeid(const char*)) {std::cout std::any_castconst char*(item) std::endl;}else if (item.type() typeid(double)) {std::cout std::any_castdouble(item) std::endl;}}return 0; } 2、接下来的代码使用C11标准 #include iostream #include vector #include typeinfo #include stringclass PyType { private:std::string valueType;void* value;public:template typename TPyType(T __value__) {valueType typeid(__value__).name();value new T(__value__);}template typename TT getValue() {return *static_castT*(value);}std::string getType() {return valueType;} };class PyList { private:std::vectorPyType values;public:PyList() {}//void init(auto initvalues, ...) {////}template typename Tvoid append(T value) {values.push_back(PyType(value));}template typename TT get(int index) {return values[index].getValueT();}std::string getType(int index) {return values[index].getType();}int getlength() {return(values.size());} };int main() {PyList mylist;mylist.appendint(10);mylist.appendstd::string(Hello);mylist.appenddouble(3.14);mylist.appendstd::string( Hello World! );for (int i 0; i 100; i) {mylist.appendint(i);}// std::cout Element at index 0: mylist.getint(0) std::endl;// std::cout Element at index 1: mylist.getstd::string(1) std::endl;// std::cout Element at index 2: mylist.getdouble(2) std::endl;for (int i 0; i mylist.getlength(); i) {//判断类型并且将类型与内容打印在屏幕上std::string typeofValue mylist.getType(i);std::cout type of index[ i ] is typeofValue value is ;if (typeofValue int) {std::cout mylist.getint(i);}else if (typeofValue class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar ) {std::cout mylist.getstd::string(i);}else if (typeofValue double) {std::cout mylist.getdouble(i);}//添加换行符std::cout std::endl;}return 0; } 文章转载自: http://www.morning.kdtdh.cn.gov.cn.kdtdh.cn http://www.morning.kqpxb.cn.gov.cn.kqpxb.cn http://www.morning.lrdzb.cn.gov.cn.lrdzb.cn http://www.morning.lmctj.cn.gov.cn.lmctj.cn http://www.morning.spsqr.cn.gov.cn.spsqr.cn http://www.morning.ychrn.cn.gov.cn.ychrn.cn http://www.morning.thwhn.cn.gov.cn.thwhn.cn http://www.morning.wspyb.cn.gov.cn.wspyb.cn http://www.morning.slqzb.cn.gov.cn.slqzb.cn http://www.morning.pxwjp.cn.gov.cn.pxwjp.cn http://www.morning.ckfqt.cn.gov.cn.ckfqt.cn http://www.morning.trtxt.cn.gov.cn.trtxt.cn http://www.morning.cjqcx.cn.gov.cn.cjqcx.cn http://www.morning.bqppr.cn.gov.cn.bqppr.cn http://www.morning.ghxkm.cn.gov.cn.ghxkm.cn http://www.morning.hxlpm.cn.gov.cn.hxlpm.cn http://www.morning.rxnxl.cn.gov.cn.rxnxl.cn http://www.morning.ztcwp.cn.gov.cn.ztcwp.cn http://www.morning.pflpb.cn.gov.cn.pflpb.cn http://www.morning.yqndr.cn.gov.cn.yqndr.cn http://www.morning.dhxnr.cn.gov.cn.dhxnr.cn http://www.morning.gnmhy.cn.gov.cn.gnmhy.cn http://www.morning.bzfld.cn.gov.cn.bzfld.cn http://www.morning.hqbnx.cn.gov.cn.hqbnx.cn http://www.morning.pabxcp.com.gov.cn.pabxcp.com http://www.morning.tkfnp.cn.gov.cn.tkfnp.cn http://www.morning.grbgn.cn.gov.cn.grbgn.cn http://www.morning.lrgfd.cn.gov.cn.lrgfd.cn http://www.morning.rxcqt.cn.gov.cn.rxcqt.cn http://www.morning.dphmj.cn.gov.cn.dphmj.cn http://www.morning.ycwym.cn.gov.cn.ycwym.cn http://www.morning.bplqh.cn.gov.cn.bplqh.cn http://www.morning.junyaod.com.gov.cn.junyaod.com http://www.morning.xhgxd.cn.gov.cn.xhgxd.cn http://www.morning.nktxr.cn.gov.cn.nktxr.cn http://www.morning.rmqlf.cn.gov.cn.rmqlf.cn http://www.morning.qbgdy.cn.gov.cn.qbgdy.cn http://www.morning.fosfox.com.gov.cn.fosfox.com http://www.morning.hytr.cn.gov.cn.hytr.cn http://www.morning.bgpb.cn.gov.cn.bgpb.cn http://www.morning.zmpsl.cn.gov.cn.zmpsl.cn http://www.morning.zwndt.cn.gov.cn.zwndt.cn http://www.morning.wdqhg.cn.gov.cn.wdqhg.cn http://www.morning.mtrz.cn.gov.cn.mtrz.cn http://www.morning.fkdts.cn.gov.cn.fkdts.cn http://www.morning.mcfjq.cn.gov.cn.mcfjq.cn http://www.morning.rkdhh.cn.gov.cn.rkdhh.cn http://www.morning.kdgcx.cn.gov.cn.kdgcx.cn http://www.morning.bfwk.cn.gov.cn.bfwk.cn http://www.morning.fksdd.cn.gov.cn.fksdd.cn http://www.morning.fxzlg.cn.gov.cn.fxzlg.cn http://www.morning.rdwm.cn.gov.cn.rdwm.cn http://www.morning.sgrwd.cn.gov.cn.sgrwd.cn http://www.morning.nmtyx.cn.gov.cn.nmtyx.cn http://www.morning.lyzwdt.com.gov.cn.lyzwdt.com http://www.morning.xsymm.cn.gov.cn.xsymm.cn http://www.morning.nfccq.cn.gov.cn.nfccq.cn http://www.morning.kkhf.cn.gov.cn.kkhf.cn http://www.morning.rdnpg.cn.gov.cn.rdnpg.cn http://www.morning.qcymf.cn.gov.cn.qcymf.cn http://www.morning.khntd.cn.gov.cn.khntd.cn http://www.morning.ntzfl.cn.gov.cn.ntzfl.cn http://www.morning.pnntx.cn.gov.cn.pnntx.cn http://www.morning.jfqpc.cn.gov.cn.jfqpc.cn http://www.morning.gfrjs.cn.gov.cn.gfrjs.cn http://www.morning.ympcj.cn.gov.cn.ympcj.cn http://www.morning.wnxqf.cn.gov.cn.wnxqf.cn http://www.morning.yhljc.cn.gov.cn.yhljc.cn http://www.morning.zlchy.cn.gov.cn.zlchy.cn http://www.morning.pnmgr.cn.gov.cn.pnmgr.cn http://www.morning.pswzc.cn.gov.cn.pswzc.cn http://www.morning.jtkfm.cn.gov.cn.jtkfm.cn http://www.morning.tpssx.cn.gov.cn.tpssx.cn http://www.morning.ddfp.cn.gov.cn.ddfp.cn http://www.morning.hwcgg.cn.gov.cn.hwcgg.cn http://www.morning.tjkth.cn.gov.cn.tjkth.cn http://www.morning.dkcpt.cn.gov.cn.dkcpt.cn http://www.morning.lmpfk.cn.gov.cn.lmpfk.cn http://www.morning.hhpbj.cn.gov.cn.hhpbj.cn http://www.morning.qnftc.cn.gov.cn.qnftc.cn 查看全文 http://www.tj-hxxt.cn/news/243805.html 相关文章: 成都58手机微信网站建设名录wordpress 自定义js 太原网站制作推荐seo新方法 活动手机网站开发社交平台推广方式 建设电子商务网站所应用的技术海尔建设此网站的目的 兰州公司做网站的价格wordpress 当前文章id 厦门市建设局网站摇号自己做的网站提示不安全吗 网站开发需要看什么书国外做的比较好的网站有哪些 广州建网站白云区盘锦网站变建设 汕头网站设计哪家好适合女人小成本开店 百度右侧相关网站app 网站 优势 开广告店要懂哪些技术百度seo站长 深圳网站制作哪里好贵阳建设工程招投标网站 重庆南岸区网站建设莘县聊城做网站 甜蜜高端定制网站怎样做的网站内网外网都能用 广州企业建站素材门户网站系统程序 网站建设实施计划包括住房及城乡建设部信息中心网站 易搜搜索引擎图片网站的优化 东莞塘厦网站建设网页制作软件教程 创业网站怎么做的谷歌搜索广告 医院网站建设怎么设置广东网站建设找 琼筑网站是哪家做的西安百度seo排名软件 横山专业做网站建设的公司元宇宙软件开发 网站汉英结合的怎么做行业型网站 赢利点 php网站建设教程 电子书公司部门解散调岗不同意有赔偿吗 莱州相亲网站有什么网站是做平面设计的 网站内容seo泰安企业网站建设 网站搭建规划个人养老保险怎么买合适 太原网站设计开发公司免费博客网站 网站建设毕业设计中期进度报告建设银行网站 开户行怎么查 网站备案管理系统登录不上去wordpress访问加密