| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 758 人关注过本帖
标题:调试时遇到的一个问题
只看楼主 加入收藏
Donie
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2006-11-2
收藏
 问题点数:0 回复次数:5 
调试时遇到的一个问题
我在调试时 出现这样的信息
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.


我的程序是存在D:盘的,为什么会出现系统文件的目录呢?
搜索更多相关主题的帖子: Loaded matching symbolic found information 
2006-11-20 21:47
zinking
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:35
帖 子:916
专家分:0
注 册:2004-12-5
收藏
得分:0 
问题比较大,贴一下你的源码和配置

http://kongfuziandlife. http://codeanddesign.
2006-11-20 22:57
Donie
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2006-11-2
收藏
得分:0 

//file MazePath.cpp
#include "MazePath.h"
#include <stdlib.h> //for malloc()
#include <stdio.h>

int a[10][10]={
{1,1,1,1,1,1,1,1,1,1},//MazePath
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,0,0,1,1,0,0,1},
{1,0,1,1,1,0,0,0,0,1},
{1,0,0,0,1,0,0,0,0,1},
{1,0,1,0,0,0,1,0,0,1},
{1,0,1,1,1,0,1,1,0,1},
{1,1,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1},
};

void setPose(MazePath * ps,PosType t)//设置通道块的坐标
{
ps->seat.x=t.x;
ps->seat.y=t.y;
}

MazePath* initialize(void)
{
MazePath *pt;
PosType t;
t.x=1;
t.y=1;
pt = (MazePath* )malloc( sizeof(MazePath));
pt->ord=3;
pt->di=north;
setPose(pt,t);//begin from (1,1)

return pt;
}

void destroy(MazePath* ps)
{ MazePath* pt;
while(ps->next!=NULL)
{
pt=ps;
ps=ps->next;
free(pt);}
}


bool empty(MazePath* ps)//判断是否是空栈
{
return ps->ord==0;
}

int size(MazePath* ps)//判断栈的深度
{
return ps->ord;
}

bool cross(MazePath* ps)
{
return a[ps->seat.x][ps->seat.y]==0;
}
PosType top(MazePath* ps)//返回栈顶的坐标
{
return ps->seat;
}

MazePath* before(MazePath* pt,MazePath * ps)//返回指针指向的上一个元素
{
MazePath* pa;
pa=pt;
while (pa->next->ord<ps->ord-1)
{
pa=pa->next;
}
return pa;
}

void pop(MazePath* ps,MazePath * pHead)//栈顶出栈
{
destroy(ps);
ps=before(pHead,ps);
}

bool sear(MazePath const* pt,MazePath const* ps)//遍历,看栈顶有没有在路径上
{

while(pt!=ps)
{if((pt->seat.x ==ps->seat.x)&&(pt->seat.y==ps->seat.y)) {}
else return false;
pt=pt->next;
}
return true;
}

void push(MazePath* ps,director n)//增加新的栈顶元素,n是方向
{

MazePath *pt;
pt= (MazePath* )malloc(sizeof(MazePath));
pt->ord=ps->ord+1;
pt->di=n;
switch(ps->di)
{
case 1:
{
pt->seat.x=ps->seat.x;
pt->seat.y=ps->seat.y-1;
}
case 2:
{
pt->seat.x=ps->seat.x-1;
pt->seat.y=ps->seat.y;
}
case 3:
{
pt->seat.x=ps->seat.x;
pt->seat.y=ps->seat.y+1;
}
case 4:
{
pt->seat.x=ps->seat.x+1;
pt->seat.y=ps->seat.y;
}
}

ps->next=pt;
ps=ps->next;

}


void prints(MazePath const* pt)//打印结果
{
while (pt->next!=NULL)
{

printf("%d ",pt->ord);
printf("(");
printf("%d",pt->seat.x);
printf(",");
printf("%d",pt->seat.y);
printf(")/n");
}
}


director dirchange(MazePath* ps)//change the director
{
ps->di=(enum director)(ps->di+1);
return (enum director)(ps->di%4);

}
//~file MazePath.cpp
这是函数定义的文件,我感觉是不是做链表的时候有错
//file MazePath.h
#ifndef _C_MAZEPATH_H_INCLUDED_
#define _C_MAZEPATH_H_INCLUDED_

enum director {north=1,west,south,east};
struct PosType
{
int x;
int y;
};
struct MazePath//迷宫堆栈
{
int ord;//通道块在路径上的序号
PosType seat;//通道块在迷宫中坐标位置
enum director di;//从此通道走到"下一通道"的方向
MazePath *next;

};

MazePath* initialize(void);
void destroy(MazePath* ps);
bool empty(MazePath* ps);
int size(MazePath* ps);
bool cross(MazePath* ps);
PosType top(MazePath* ps);
MazePath* before(MazePath* pt,MazePath * ps);//for the last one
void pop(MazePath* ps,MazePath* pt);
void push(MazePath* ps,director n);
void setPose(MazePath * ps,PosType t);//for set the setPos
void prints(MazePath const* pt);
director dirchange(MazePath* ps);//change the director
bool sear(MazePath const* pt,MazePath const* ps);
#endle

AMD sempron3100+ 1.8GHZ 512M

前两天还中了个kill木马,不知道有没有影响

2006-11-21 10:48
smartwind
Rank: 1
等 级:新手上路
威 望:1
帖 子:277
专家分:0
注 册:2006-11-13
收藏
得分:0 

把你头文件里的#ifdef #endle去掉


2006-11-21 11:43
smartwind
Rank: 1
等 级:新手上路
威 望:1
帖 子:277
专家分:0
注 册:2006-11-13
收藏
得分:0 
似乎我这里没有问题......
你的main函数在哪里?

2006-11-21 11:44
Donie
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2006-11-2
收藏
得分:0 

//file MazePathtest.cpp
#include "MazePath.h"
#include <stdio.h>
#include <stdlib.h>

int main()
{
int a[10][10]={
{1,1,1,1,1,1,1,1,1,1},//MazePath
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,1,0,0,0,1,0,1},
{1,0,0,0,0,1,1,0,0,1},
{1,0,1,1,1,0,0,0,0,1},
{1,0,0,0,1,0,0,0,0,1},
{1,0,1,0,0,0,1,0,0,1},
{1,0,1,1,1,0,1,1,0,1},
{1,1,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1},
};
int n=1;
int i,j;
for(i=0;i<=9;i++) //打印迷宫在屏幕上
{for(j=0;j<=9;j++)
printf("%d\t",a[i][j]);
}
printf("\n\n");

MazePath *ps;
MazePath *pHead;
pHead=initialize();
ps=pHead;
do{
push(ps,dirchange(ps));
if(cross(ps))
{
if(sear(pHead,ps))//如果不在原来的路径上
{;}
else
{pop(ps,pHead);}
}
else
{pop(ps,pHead);}n++;
}while((!empty(ps))&&(ps->seat.x<9)&&(ps->seat.y<9));//?循环条件可能有问题?枚举的问题
printf("%d",n);
ps->next=NULL;
prints(pHead);
destroy(pHead);
system("Pause");
return 0;
}
这是主函数,我觉得好像可能产生新结点分配内存那有问题吧

2006-11-21 18:17
快速回复:调试时遇到的一个问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050371 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved