访问违规问题 [英] access violation problem

查看:84
本文介绍了访问违规问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



int main()

{

char record_typec =''c'';

record_typec = toupper(record_typec);

* rec-> Newcrecord.record_type = record_typec;






\ *************************************** ****** \


我已对程序运行调试,这就是我遇到访问权限

违规问题。我已经尝试过点操作符来访问结构但是

似乎没有用。如何更改语法并避免访问

违规错误?

解决方案

" JasBascom" < JA ******* @ aol.com>在消息中写道

news:20 *************************** @ mb-m11.aol.com < blockquote class =post_quotes> int main()
{char record_typec =''c'';
record_typec = toupper(record_typec);
* rec-> Newcrecord .record_type = record_typec;


等等

\ ********************* ************************ \

我已经对程序进行了调试,这就是我所在的地方我遇到了访问违规问题。我已经尝试过点操作符来访问结构,但这似乎不起作用。如何更改
语法并避免访问冲突错误?



由于大多数人缺乏心灵能力,我建议你告诉我们

如何定义rec。

-

John Carson

1.要回复电子邮件地址,请删除donald

2.不要回复电子邮件地址(在此处发帖)


JasBascom写道:


int main()
{char record_typec =''c'';
record_typec = toupper(record_typec);
* rec-> Newcrecord.record_type = record_typec;

等等

\ ************************ ********************* \

我已经对程序进行了调试,这就是我遇到的地方
访问冲突问题。我已经尝试过点运算符来访问
结构,但这似乎不起作用。如何更改语法
并避免访问冲突错误?




人们怎么会知道?什么是rec?它在哪里定义?看来

是一个指针,所以你在哪里指出了什么?什么是

最后一行开头应该做的''*'?


rec是指针到了一个工会

它被宣布为联盟Allrecords * rec。

既然你知道rec是什么可以帮助你帮助我吗?


int main()
{
char record_typec = ''c'';
record_typec = toupper(record_typec);
* rec->Newcrecord.record_type = record_typec;

etc
etc

\*********************************************\

I''ve run a debug on the program and this is where I''m encountering the access
violation problem. I''ve tried the dot operator to access the structure but that
doesn''t appear to work. How can change the syntax and avoid the access
violation error?

解决方案

"JasBascom" <ja*******@aol.com> wrote in message
news:20***************************@mb-m11.aol.com

int main()
{
char record_typec = ''c'';
record_typec = toupper(record_typec);
* rec->Newcrecord.record_type = record_typec;

etc
etc

\*********************************************\

I''ve run a debug on the program and this is where I''m encountering
the access violation problem. I''ve tried the dot operator to access
the structure but that doesn''t appear to work. How can change the
syntax and avoid the access violation error?


Since most people here lack psychic abilities, I suggest that you tell us
how rec is defined.
--
John Carson
1. To reply to email address, remove donald
2. Don''t reply to email address (post here instead)


JasBascom wrote:


int main()
{
char record_typec = ''c'';
record_typec = toupper(record_typec);
* rec->Newcrecord.record_type = record_typec;

etc
etc

\*********************************************\

I''ve run a debug on the program and this is where I''m encountering the
access violation problem. I''ve tried the dot operator to access the
structure but that doesn''t appear to work. How can change the syntax
and avoid the access violation error?



How would anyone hwere know? What is rec? Where is it defined? It seems
to be a pointer, so where did you let it point to something? What is
the ''*'' at the beginning of the last line supposed to do?


rec is the pointer to a union
it is declared thus union Allrecords* rec.
Now that you know what rec is does that help you to help me?


这篇关于访问违规问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆