⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 [求助]请教指针类型强制转换问题? - c语言 - oldlinux - powered by discuz!.htm

📁 最全的介绍C语言结构体的使用方法和使用技巧!
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0056)http://www.oldlinux.org/oldlinux/viewthread.php?tid=8282 -->
<HTML><HEAD><TITLE>[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gbk">
<META content="Discuz!,Board,Comsenz,forums,bulletin board," name=keywords>
<META content="OldLinux  - Discuz! Board" name=description>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<META content=TRUE name=MSSmartTagsPreventParsing>
<META http-equiv=MSThemeCompatible content=Yes><LINK title=OldLinux 
href="http://www.oldlinux.org/oldlinux/archiver/" rel=archives><LINK id=css 
href="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/style_1.css" 
type=text/css rel=stylesheet>
<SCRIPT 
src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/common.js" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/menu.js" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/ajax.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>var IMGDIR = 'images/default';var SMDIR = 'images/smilies';</SCRIPT>
</HEAD>
<BODY onkeydown="if(event.keyCode==27) return false;">
<CENTER>
<DIV class=mainborder id=jsmenu_parent></DIV>
<DIV class=mainheader>
<DIV class=logo>
<DIV class=maintable>
<DIV align=left><A href="http://www.oldlinux.org/oldlinux/index.php"><IMG 
alt=OldLinux 
src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/logo.gif" 
border=0></A></DIV></DIV></DIV>
<DIV class=menu>
<DIV class=maintable><SPAN class=left>
<SCRIPT type=text/javascript>
if(top == self) {document.write('<img src="images/default/frame_on.gif" border="0" alt="" />&nbsp;<a href="frame.php?frameon=yes" target="_top">分栏模式</a>');
} else {
document.write('<img src="images/default/frame_off.gif" border="0" alt="" />&nbsp;<a href="frame.php?frameon=no" target="_top">平板模式</a>');
}
</SCRIPT>
</SPAN><SPAN class=bold>游客: &nbsp;</SPAN><A 
href="http://www.oldlinux.org/oldlinux/register.php">注册</A> | <A 
href="http://www.oldlinux.org/oldlinux/logging.php?action=login">登录</A> | <A 
href="http://www.oldlinux.org/oldlinux/member.php?action=list">会员</A> | <A 
href="http://www.oldlinux.org/oldlinux/stats.php">统计</A> | <A 
href="http://www.oldlinux.org/oldlinux/faq.php">帮助</A> </DIV></DIV></DIV>
<DIV class=maintable><BR>
<DIV class="subtable nav" style="WIDTH: 98%"><SPAN id=forumlist 
onmouseover=showMenu(this.id)><A 
href="http://www.oldlinux.org/oldlinux/index.php">OldLinux</A></SPAN> &raquo; <A 
href="http://www.oldlinux.org/oldlinux/forumdisplay.php?fid=20">C语言</A> &raquo; 
[求助]请教指针类型强制转换问题?</DIV><BR></DIV>
<DIV class=maintable>
<TABLE style="CLEAR: both" cellSpacing=0 cellPadding=0 width="98%" 
  align=center><TBODY>
  <TR>
    <TD vAlign=bottom>
      <DIV style="MARGIN-BOTTOM: 4px"><A style="FONT-WEIGHT: normal" 
      href="http://www.oldlinux.org/oldlinux/redirect.php?fid=20&amp;tid=8282&amp;goto=nextoldset">&#8249;&#8249; 
      上一主题</A> | <A style="FONT-WEIGHT: normal" 
      href="http://www.oldlinux.org/oldlinux/redirect.php?fid=20&amp;tid=8282&amp;goto=nextnewset">下一主题 
      &#8250;&#8250;</A><BR></DIV></TD>
    <TD vAlign=bottom align=right width="40%">
      <DIV class=right>&nbsp;<A 
      href="http://www.oldlinux.org/oldlinux/post.php?action=reply&amp;fid=20&amp;tid=8282&amp;extra="><IMG 
      alt="" 
      src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/reply.gif" 
      border=0></A></DIV>
      <DIV class=right id=newspecialheader onmouseover=showMenu(this.id)><A 
      href="http://www.oldlinux.org/oldlinux/post.php?action=newthread&amp;fid=20&amp;extra="><IMG 
      alt="" 
      src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/newtopic.gif" 
      border=0></A><A 
      href="http://www.oldlinux.org/oldlinux/viewthread.php?tid=8282###"><IMG 
      alt="" 
      src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/newspecial.gif" 
      border=0></A></DIV>
      <DIV class="popupmenu_popup newspecialmenu" id=newspecialheader_menu 
      style="DISPLAY: none">
      <TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
        <TBODY>
        <TR>
          <TD class=popupmenu_option>
            <DIV class=newspecial><A 
            href="http://www.oldlinux.org/oldlinux/post.php?action=newthread&amp;fid=20&amp;extra=&amp;poll=yes">投票</A></DIV></TD></TR>
        <TR>
          <TD class=popupmenu_option>
            <DIV class=newspecial><A 
            href="http://www.oldlinux.org/oldlinux/post.php?action=newthread&amp;fid=20&amp;extra=&amp;trade=yes">交易</A></DIV></TD></TR>
        <TR>
          <TD class=popupmenu_option>
            <DIV class=newspecial><A 
            href="http://www.oldlinux.org/oldlinux/post.php?action=newthread&amp;fid=20&amp;extra=&amp;reward=yes">悬赏</A></DIV></TD></TR>
        <TR>
          <TD class=popupmenu_option>
            <DIV class=newspecial><A 
            href="http://www.oldlinux.org/oldlinux/post.php?action=newthread&amp;fid=20&amp;extra=&amp;activity=yes">活动</A></DIV></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></DIV>
<SCRIPT type=text/javascript>
function fastreply(subject) {
if($('postform')) {
$('postform').subject.value = subject;
$('postform').message.focus();
}
}
</SCRIPT>

<DIV class=maintable>
<DIV class=spaceborder style="WIDTH: 98%; BORDER-BOTTOM: medium none">
<TABLE cellSpacing=0 cellPadding=4 width="100%" align=center>
  <TBODY>
  <TR class=header>
    <TD style="COLOR: #154ba0" colSpan=2>
      <DIV class=right style="FONT-WEIGHT: normal"><A 
      href="http://www.oldlinux.org/oldlinux/viewthread.php?action=printable&amp;tid=8282" 
      target=_blank>打印</A> | <A 
      href="http://www.oldlinux.org/oldlinux/misc.php?action=emailfriend&amp;tid=8282">推荐</A> 
      | <A id=ajax_subscription onclick="ajaxmenu(event, this.id)" 
      href="http://www.oldlinux.org/oldlinux/my.php?item=subscriptions&amp;subadd=8282">订阅</A> 
      | <A id=ajax_favorite onclick="ajaxmenu(event, this.id)" 
      href="http://www.oldlinux.org/oldlinux/my.php?item=favorites&amp;tid=8282">收藏</A> 
      </DIV>标题: [求助]请教指针类型强制转换问题?</TD></TR></TBODY></TABLE></DIV>
<FORM name=delpost 
action=topicadmin.php?action=delpost&amp;fid=20&amp;tid=8282&amp;page=1 
method=post><INPUT type=hidden value=cbdd3b3d name=formhash> 
<DIV class=spaceborder 
style="BORDER-TOP: medium none; MARGIN-BOTTOM: 4px; WIDTH: 98%">
<TABLE class=t_row cellSpacing=0 cellPadding=4 width="100%" align=center>
  <TBODY>
  <TR style="HEIGHT: 100%">
    <TD class=t_user vAlign=top width="18%"><A name=pid33550></A><A class=bold 
      href="http://www.oldlinux.org/oldlinux/space.php?uid=8795" 
      target=_blank>porsche</A> <BR>
      <DIV class=smalltxt>新手上路<BR><IMG alt="Rank: 1" 
      src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/star_level1.gif"><BR>Member<BR><BR><BR><BR>UID 
      8795<BR>精华 0<BR>积分 21<BR>帖子 15<BR>阅读权限 10<BR>注册 2007-3-21<BR>状态 离线 
    </DIV></TD>
    <TD 
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" 
    vAlign=top width="82%">
      <TABLE class=t_msg cellSpacing=0 cellPadding=4 border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV>
            <DIV class="right t_number"><A class=bold title=复制帖子链接到剪贴板 
            onclick="setcopy('http://www.oldlinux.org/oldlinux/viewthread.php?tid=8282&amp;page=1#pid33550', '已经复制到剪贴板')" 
            href="http://www.oldlinux.org/oldlinux/viewthread.php?tid=8282###">#1</A></DIV>
            <DIV class=right style="PADDING-TOP: 4px"><A 
            href="http://www.oldlinux.org/oldlinux/magic.php?action=user&amp;pid=33550" 
            target=_blank>使用道具</A>&nbsp;&nbsp;</DIV>
            <DIV style="PADDING-TOP: 4px">发表于 2007-4-8 22:11&nbsp; <A 
            href="http://www.oldlinux.org/oldlinux/viewpro.php?uid=8795" 
            target=_blank>资料</A>&nbsp; <A title=porsche的个人空间 
            href="http://www.oldlinux.org/oldlinux/space.php?uid=8795" 
            target=_blank>个人空间</A>&nbsp; <A 
            href="http://www.oldlinux.org/oldlinux/pm.php?action=send&amp;uid=8795" 
            target=_blank>短消息</A>&nbsp; <A id=ajax_buddy_0 
            onclick="ajaxmenu(event, this.id)" 
            href="http://www.oldlinux.org/oldlinux/memcp.php?action=buddylist&amp;newbuddyid=8795&amp;buddysubmit=yes" 
            target=_blank>加为好友</A>&nbsp; </DIV></DIV></TD></TR>
        <TR>
          <TD class=line style="PADDING-TOP: 10px" vAlign=top height="100%">
            <DIV style="FLOAT: right" align=right><A title="评分 0" 
            href="http://www.oldlinux.org/oldlinux/misc.php?action=viewratings&amp;tid=8282&amp;pid=33550"></A></DIV><SPAN 
            class=bold>[求助]请教指针类型强制转换问题?</SPAN><BR><BR>
            <DIV class=t_msgfont id=message33550>书上有这么一句&amp;#35;define 
            get_base(ldt) _get_base( ((char *)&amp;(ldt)) 
            )<BR>这是取ldt的地址值,然后把它强制转换成char型的指针,请问为什么不转换成long或int型的指针,转换成char型的指针不就变成字符串了吗?</DIV><BR 
            style="CLEAR: both"><FONT 
            style="FONT: 12px Tahoma, Verdana; COLOR: #333333"></FONT></TD></TR>
        <TR>
          <TD align=right><A onclick=scroll(0,0) 
            href="http://www.oldlinux.org/oldlinux/viewthread.php?tid=8282###"><IMG 
            alt=顶部 
            src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/top.gif" 
            border=0></A> </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>
<DIV class=spaceborder style="MARGIN-BOTTOM: 4px; WIDTH: 98%">
<TABLE class=t_row cellSpacing=0 cellPadding=4 width="100%" align=center>
  <TBODY>
  <TR style="HEIGHT: 100%">
    <TD class=t_user vAlign=top width="18%"><A name=pid33551></A><A class=bold 
      href="http://www.oldlinux.org/oldlinux/space.php?uid=12195" 
      target=_blank>wildcatgsk</A> <BR>
      <DIV class=smalltxt>版主<BR><IMG alt="Rank: 7" 
      src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/star_level3.gif"><IMG 
      alt="Rank: 7" 
      src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/star_level2.gif"><IMG 
      alt="Rank: 7" 
      src="[求助]请教指针类型强制转换问题? - C语言 - OldLinux - Powered by Discuz!.files/star_level1.gif"><BR>Member<BR><BR><BR><BR>UID 
      12195<BR>精华 <A 
      href="http://www.oldlinux.org/oldlinux/digest.php?authorid=12195">6</A> 
      <BR>积分 415<BR>帖子 322<BR>阅读权限 100<BR>注册 2004-5-13<BR>状态 离线 </DIV></TD>
    <TD 
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -