码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
c++中指针访问变量
指针变量与间址访问能够存放地址值的变量成为指针变量声明:int *p;//在变量说明语句中,*是表示指针类型,也就是用来说明p是存放地址的变量int a=10;p=&a;coutusing namespace std;int main(){long int a=10,b=20,temp;long i...
分类:编程语言   时间:2015-04-10 13:22:20    阅读次数:188
把dataTable数据转换为Html
using System;using System.Collections.Generic;using System.Data;using System.Linq;using System.Text;using System.Threading.Tasks;namespace CommonSched...
分类:Web程序   时间:2015-04-10 11:13:59    阅读次数:127
MAX值-单元测试
1 #include 2 using namespace std; 3 int Largest(int list[], int length); // list[]:求最大值的函数, 4 int main() 5 { 6 int list[100]; //长度为100的数组 7 ...
分类:其他好文   时间:2015-04-10 10:50:11    阅读次数:150
C++/CLI——使用嵌套 if 语句的 CLR 程序
// 嵌套ifCLR.cpp: 主项目文件。 #include "stdafx.h" using namespace System; int main(array ^args) { wchar_t letter; Console::WriteLine(L"Enter a letter: "); letter = Console::Read(); if(let...
分类:编程语言   时间:2015-04-10 09:41:34    阅读次数:167
hdu1850Being a Good Boy in Spring Festival NiM博弈
//当该点时p-position时,先手输 //当该点为n-position时,即a1^a2......^an = k时; //先手的第一步是使得a1^a2^.......^an^k = 0; //那么只要ai^k #include #include #include using namespace std ; const int maxn = 10000010 ; int n...
分类:编程语言   时间:2015-04-10 09:41:33    阅读次数:157
STL学习笔记之sstream
int转string #include #include #include using namespace std ; int main() { int int_s = 12345 ; string s ; //声明字符串s stringstream stream ; //声明stream stream << int_s ; ...
分类:其他好文   时间:2015-04-10 09:41:29    阅读次数:142
蓝桥杯 - 2的次幂表示 (递归)
题目传送:蓝桥杯 - 2的次幂表示 思路:这递归递的我头都晕了,先贴个伪递归吧 AC代码: #include #include #include using namespace std; void fun1(int a) { //输出2的a次方,因为题目最大就20000,2的15次方足以 if(a == 0) printf("2(0)"); else if(a...
分类:其他好文   时间:2015-04-10 09:38:19    阅读次数:135
剑指offer中在一个有序数组中找出和为s的两个数字
#include using namespace std; bool findnumberwithsum(int A[],int length,int *num1,int *num2,int key) { if(NULL==A||length return false; int start=0; int end=length-1; int sum=0; while(start ...
分类:编程语言   时间:2015-04-10 09:32:07    阅读次数:234
《挑战程序设计竞赛》 2^n类型的深搜
题意:从n个数中选取任意个数的数,看是否等于k。 代码给出了十分清晰简洁的优雅递归写法。#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int LL; const in...
分类:其他好文   时间:2015-04-09 23:53:26    阅读次数:224
c++刷题一
(一)输出其中的最大值。 #include using namespace std; int main() { int a,b,c,max; cin>>a>>b>>c; max=a; if(b>max) max=b; if(c>max) max=c; cout<<max<<endl; } (二)输出y的值。(1) #...
分类:编程语言   时间:2015-04-09 23:52:27    阅读次数:375
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!