摘要: // TemplateFunction.cpp : Defines the entry point for the console application. // #include "stdafx.h" template T MyMax(T a,T b) { return a>b ? a : b; } int main(int argc, char* argv[]) { i... 阅读全文
posted @ 2017-02-14 23:43 sky20080101 阅读(144) 评论(0) 推荐(0)
摘要: 在可以调用 OLE 之前,必须将当前线程设置为单线程单元(STA)模式,请确保您的Main函数带有STAThreadAttribute标记。 参考自:http://www.cnblogs.com/winzheng/archive/2008/12/02/1345656.html 参考自:http:// 阅读全文
posted @ 2017-02-14 14:32 sky20080101 阅读(184) 评论(0) 推荐(0)
摘要: #include #include using namespace std; void main() { string s="Hello Lucy!"; //s.replace(5,1,"Lily"); //"Lucy" -> "Lily" int indexStart=s.find("Lucy"); string l("Lily"); in... 阅读全文
posted @ 2017-02-14 09:17 sky20080101 阅读(229) 评论(0) 推荐(0)