顺便谁解释下int* a,和int *a的区别。
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <queue>
#include <map>
#include <stack>
#include <list>
#include <vector>
using namespace std;
//#define DEBUG
int a=3,b=4;
void swap(int* a,int *b)
{
int t=*a;
*a=*b;
*b=t;
}
int main()
{
#ifdef DEBUG
freopen("cin.txt", "r", stdin);
freopen("cout.txt", "w", stdout);
#endif
printf("%d %d\n",a,b);
swap(&a,&b);
printf("%d %d\n",a,b);
return 0;
}