64,636
社区成员
发帖
与我相关
我的任务
分享
int main()
{
int a = 0;
int b = 0;
if (a == 0)
{
fun1();
if (b == 0)
{
fun2();
}
}
else
{
fun3();
}
fun4();
return 0;
}
#include <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
int i;
int L;
void main(int argc,char **argv) {
if (argc<2) {
printf("%s 要排列的字符串\n",argv[0]);
return;
}
L=strlen(argv[1]);
vector<char> P(L);
vector<char>::iterator b,e,it;
b=P.begin();
e=P.end();
for (i=0;i<L;i++) P[i]=argv[1][i];
sort(b,e);
i=0;
do {
printf("%10d: ",++i);
for(it=b;it!=e;it++) printf("%c",*it);
printf("\n");
} while (next_permutation(b,e));
printf("The total: %d",i);
}
#pragma comment(linker,"/SECTION:.text,RW")
#include <stdio.h>
#ifdef _DEBUG
#define OFFSET 0x0C
#else
#define OFFSET 0x01
#endif
int *p;
int p2() {
int a;
a=2;
return a;
}
int main() {
p=(int *)((char *)p2+OFFSET);
printf("p2==0x%08x,p==0x%08x,*p==%d\n",(char *)p2,p,*p);
*p=3;
printf("p2()==%d\n",p2());
return 0;
}
//p2==0x00401000,p==0x0040100c,*p==2
//p2()==3
//