read() stdin in c?

前端 未结 2 531
被撕碎了的回忆
被撕碎了的回忆 2021-01-26 18:02

I have a quick little question involving the read() command.

I am really rusty in C, and unfortunately, my current assignment has me programming in C. We need to read st

2条回答
  •  伪装坚强ぢ
    2021-01-26 18:09

    Your input dosn't point anywhere valid. You need to either allocate some memory (and free it when you're done) or make it point to valid storage.

    Also = is assignment; == is comparison.

提交回复
热议问题