文章列表
#include "stdafx.h"
#include <iostream>
#include <vector>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
/****数组用法****/
int iar[6] = {-12,-2,0,8,5,4};
vector<int> ivec(10,3);
vector<int> ivec1(iar+1,iar+4);
vector<int> ivec2(ive ...
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
/****const 指针****/
const double pi = 3.14;
//double *p = π//错误,const对象的地址只能传给 指向const对象 的指针
const double *p = 0;
p = π
//*p += 1.4;//错误,不能通过 指向cons ...
/****Lession1.h****/
extern bool a;
extern int b;
extern float c;
extern double d;
extern unsigned int e;
extern long f;
extern unsigned long g;
extern char h;
extern long double i;
/****Lession1.cpp****/
#include "stdafx.h"
#include "Lession1.h"
bool a;
int b ...