亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 6560 | 回復(fù): 4
打印 上一主題 下一主題

[函數(shù)] sscanf函數(shù)的參數(shù)format中,%p是什么意思? [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2003-03-27 17:22 |只看該作者 |倒序瀏覽
一條語句:
sscanf(s, "%p", &at);

s是一個字符串,at是void *,這句程序是什么意思?
man sscanf里都沒有%p的解釋?


謝謝!

論壇徽章:
0
2 [報告]
發(fā)表于 2003-03-27 18:33 |只看該作者

sscanf函數(shù)的參數(shù)format中,%p是什么意思?

p          A sequence of unsigned hexadecimal numbers is expected.  This sequence may be produced by the conversion character of printf.  The corresponding argument shall be a pointer to a pointer to void into  which the value represented by the hexadecimal sequence is stored.  The behavior of this conversion is undefined for any input item other than a value converted earlier during the same program execution.

論壇徽章:
0
3 [報告]
發(fā)表于 2003-03-27 18:39 |只看該作者

sscanf函數(shù)的參數(shù)format中,%p是什么意思?

...scanf Type Characters
The information in this table is based on the assumption that no optional
characters, specifiers, or modifiers (*, width, or size) were included in
the format specifier.

■ NOTE: Certain conventions accompany some of these format specifiers.

   Type │                    │
   Char │ Expected input     │ Type of argument
═══════╧════════════════════╧═════
  Numerics
═══════╤════════════════════╤═════
   d    │ Decimal integer    │ Pointer to int (int *arg)
   D    │ Decimal integer    │ Pointer to long (long *arg)
   e, E │ Floating point     │ Pointer to float (float *arg)
   f    │ Floating point     │ Pointer to float (float *arg)
   g, G │ Floating point     │ Pointer to float (float *arg)
   o    │ Octal integer      │ Pointer to int (int *arg)
   O    │ Octal integer      │ Pointer to long (long *arg)
   i    │ Decimal, octal, or │ Pointer to int (int *arg)
         │ hexadecimal integer│
    I    │ Decimal, octal, or │ Pointer to long (long *arg)
         │ hexadecimal integer│
    u    │ Unsigned decimal   │ Pointer to unsigned int
         │ integer            │ (unsigned int *arg)
    U    │ Unsigned decimal   │ Pointer to unsigned long
         │ integer            │ (unsigned long *arg)
    x    │ Hexadecimal integer│ Pointer to int (int *arg)
    X    │ Hexadecimal integer│ Pointer to long (long *arg)
  ═══════╧════════════════════╧═════
   Characters
  ═══════╤════════════════════╤═════
    s    │ Character string   │ Pointer to array of chars (char arg[])
    c    │ Character          │ Pointer to char (char *arg) if a field width
         │                    │ W is given along with the c-type character
         │                    │ (such as %5c)
         │                    │ Pointer to array of W chars (char arg[W])
    %    │ % character        │ No conversion done; the % is stored
  ═══════╧════════════════════╧═════
   Pointers
  ═══════╤════════════════════╤═════
    n    │                    │ Pointer to int (int *arg). The number
         │                    │ of characters read successfully up to %n
         │                    │ is stored in this int.
    p    │ Hexadecimal form   │ Pointer to an object (far* or near*)
         │ YYYY:ZZZZ or       │ %p conversions default to the pointer
         │ ZZZZ               │ size native to the memory model

論壇徽章:
0
4 [報告]
發(fā)表于 2003-03-27 20:48 |只看該作者

sscanf函數(shù)的參數(shù)format中,%p是什么意思?

ansi c里有很詳細的解釋,要用qq:16629385聯(lián)系(中文版)

論壇徽章:
0
5 [報告]
發(fā)表于 2003-03-28 09:01 |只看該作者

sscanf函數(shù)的參數(shù)format中,%p是什么意思?

這是我以前發(fā)過的:
http://chinaunix.net/forum/viewtopic.php?t=24825&highlight=
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP