Giter VIP home page Giter VIP logo

Comments (3)

sYstemk1t avatar sYstemk1t commented on August 23, 2024

1-6明白了。
1-9,1-10,确实出问题了,我得getchar无论输入任何任何值,c得值一直都为0,编译过了,但是报了警告,初始化也有问题。
1-12和1-14只有到了字符串尾得时候执行了。
1-17已更正。
1-19已重写。

from learn.

r00tk1ts avatar r00tk1ts commented on August 23, 2024

以后记着写好的程序要自己运行测试通过,不能仅仅保证编译没错,实在找不到错误的,可以问我。

  1. 1-9、1-10 getchar()使用错误,不是getchar(c)而是c = getchar(),你在使用库函数前要先确认函数签名、参数及返回值的意义。你这样写在VS下会有C4087 W1警告,但gcc或是clang都会直接报错,这个取决于具体编译器的实现,可以参考C4087的官方说明:https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087?view=vs-2019
  2. 把1-12和1-14重新写,这两个题很简单,不应该出现失误。

from learn.

r00tk1ts avatar r00tk1ts commented on August 23, 2024

No activity.

from learn.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.