码迷,mamicode.com
首页 >  
搜索关键字:cout    ( 7219个结果
已经排好的数组,输入一个数,按原来的规律插入数组中;
//已经排好的数组,输入一个数,按原来的规律插入数组中;  #include using namespace std; int main() { int a[100]; int i,k,t; for(i=0;i a[i]=(i+1)*2; for(i=0;i { cout if((i+1)%10==0) cout } cout cin>>k; for(i=0...
分类:其他好文   时间:2014-07-20 10:31:35    阅读次数:130
STL 源码剖析 算法 stl_algo.h -- binary_search
int main() { int A[] = { 1, 2, 3, 3, 3, 5, 8 }; const int N = sizeof(A) / sizeof(int); for (int i = 1; i <= 10; ++i) { cout << "Searching for " << i << ": " << (binary_search(A, A + N, i) ? "present" : "not present") << endl; } } /* ...
分类:其他好文   时间:2014-07-19 23:29:59    阅读次数:275
typeid, const_cast<Type>的使用
1 #include 2 using namespace std; 3 4 class A { 5 public : 6 void Show() { 7 cout 去除const或volatile限制: 1 #include 2 using n...
分类:其他好文   时间:2014-07-19 14:27:53    阅读次数:190
初探C++11 Thread
#include #include using namespace std; void hello() { cout<<"hello kitty"<<endl; } int main() { std::thread t(hello); t.join(); return 0; }...
分类:编程语言   时间:2014-07-18 23:03:18    阅读次数:343
stringstream 与空格 (大家讨论一下代码结果的原因)
#include // std::cout, std::endl#include // std::setw #include int main (){ char *p1="1 9 "; std::stringstream stringst...
分类:其他好文   时间:2014-07-18 21:34:56    阅读次数:333
VC调试闪退解决办法
在VC2010调试或执行EXE文件时,程序运行结束后自动退出了,想看到打印 可以采用几种方法:1、按ctrl+F5只执行不调试2、在cmd中手动调用 而不是直接点3、加入getchar #include using namespace std;int main(void){ cout#inc...
分类:其他好文   时间:2014-07-18 15:36:22    阅读次数:471
win32多线程 (一) 线程创建与结束等待
#include "stdafx.h"#include #include using namespace std;DWORD WINAPI ThreadFuncFirst(LPVOID param){int iCount = 50;while(iCount--){cout<<"\nThreadFun...
分类:编程语言   时间:2014-07-17 21:29:18    阅读次数:209
[C++程序设计]全局,局部变量
在函数声明中出现的参数名,其作用范围只在 本行的括号内。实际上,编译系统对函数声明中的 变量名是忽略的,即使在调用函数时也没有为它们 分配存储单元。例如int max(int a,int b);┆int max(int x,int y){ cout<<x<<y<<endl; cout<<a<<b<<...
分类:编程语言   时间:2014-07-17 14:33:29    阅读次数:209
boost: tcp client sample
#include #include using namespace std;using namespace boost::asio;void client(io_service &ios){ try { cout str(100,0); sock.read_...
分类:其他好文   时间:2014-07-16 17:43:45    阅读次数:203
《C++ Primer Plus》学习笔记2
《C++ Primer Plus》学习笔记2 第五章 循环和关系表达式 =================================================================================================================== 1、cout.setf(ios :: boolalpha)函数设置调用设置一个标记...
分类:编程语言   时间:2014-07-16 09:34:01    阅读次数:473
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!