码迷,mamicode.com
首页 >  
搜索关键字:namespace 命名空间    ( 47219个结果
C++ 箭头-> 双冒号:: 点号.操作符区别
点 . 如果变量是一个对象或者对象引用,则用它来访问对象成员.箭头 -> 如果变量是一个对象指针,则用它来访问对象成员.双冒号 :: 如果操作目标是一个具有名空间的标识符,则用它来访问其名空间内的东西.具有名空间的东西很多,除了纯粹的namespace外,正如你所知道的还...
分类:编程语言   时间:2014-05-07 14:11:10    阅读次数:495
变量自增整理
#include using namespace std;#define Max(a, b)((a > b)? a : b)int count = 9;int nMax = Max(count++, ++count);int main(){ cout<<count<<endl; cout<<...
分类:其他好文   时间:2014-05-07 11:07:48    阅读次数:242
c#之 简单stmp/pop邮件服务(一)—— 发送邮件
c#的邮件服务,主要有两种。一种是利用JMail组件,进行收发。另一种是利用vs自带的stmp/pop3邮件服务,来实现。我将要讲解的是利用stmp/pop3邮件服务。原因无它。vs自己就有,无需安装插件之类。首先,我们要添加stmp/pop3邮件服务类的命名空间:using System.Net....
分类:其他好文   时间:2014-05-07 03:02:13    阅读次数:736
XDU 1284 寻找礼物
枚举+二分查找。 A+B+C >= K  ---->   C >= K - A -B    ----> 统计大于等于C的个数即可。  #include #include #include #include #include #include using namespace std; int a[1010]; int Scan() //输入外挂 { int...
分类:其他好文   时间:2014-05-07 02:52:11    阅读次数:322
测试functional的bind以及相关功能
注:在VS2010 UPDATE1下测试通过 1 /*测试functional的bind以及相关功能*/ 2 3 #include 4 #include 5 6 using namespace std; 7 using namespace std::placeholders; 8 9 in...
分类:其他好文   时间:2014-05-07 02:33:16    阅读次数:294
SynchronizationContext的研究之一(非WPF及Forms)
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading; 6 7 8 namespace Synchroniza...
分类:其他好文   时间:2014-05-07 02:18:18    阅读次数:287
括号匹配(栈的应用)
#include #include #include using namespace std;int main(){ int n;cin>>n; while(n--){ stack s; string str;cin>>str; for(int ...
分类:其他好文   时间:2014-05-07 00:19:41    阅读次数:356
概念学习(Concept Learning)
这是概念学习的一个简单示例的C++代码。 1 #include 2 using namespace std; 3 typedef enum Sky{Sunny,Rainy}Sky; 4 typedef enum AirTemp{Warm,Cold,Cool}AirTemp; 5 type...
分类:其他好文   时间:2014-05-06 23:46:41    阅读次数:689
迷宫 填充法新思路(填充干扰路径)
#include #include using namespace std; #define n 8 int * filler=new int[n*n];//记录填充位置 int initFiller(){//初始化填充记录器 int i,j; for(i=0;i<n;i++){ for(j=0;j<n;j++){ *(filler+n*i+j)=0; } } retur...
分类:其他好文   时间:2014-05-06 21:51:33    阅读次数:323
第十一周项目1
#include using namespace std; class Stu { public: Stu (int n,string nam); void display(); protected: int num; //学号 string name; //姓名 }; Stu::Stu(int n,st...
分类:其他好文   时间:2014-05-06 21:35:26    阅读次数:292
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!