uoryon
V2EX  ›  问与答

求助了,关于编程的,如何输入一个任意长度的整形数组

  •  
  •   uoryon · Feb 19, 2012 · 6120 views
    This topic created in 5286 days ago, the information mentioned may be changed or developed.
    输入一堆数字,按空格继续输入,按回车后就不再输入了,要任意的长度,随按随停。
    3 replies    1970-01-01 08:00:00 +08:00
    uoryon
        1
    uoryon  
    OP
       Feb 19, 2012
    好困扰,好困扰,实现不能啊。
    iwinux
        2
    iwinux  
       Feb 19, 2012
    呃,我猜你是指 C 语言的实现?看看这个:http://pubs.opengroup.org/onlinepubs/000095399/functions/realloc.html
    uoryon
        3
    uoryon  
    OP
       Feb 19, 2012
    @iwinux 嗯。是C语言,我没穿越的话,应该这个开始的时候要先打一次声明空间的大小。。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4571 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:04 · PVG 18:04 · LAX 03:04 · JFK 06:04
    ♥ Do have faith in what you're doing.