c++ - Example from "Sams teach yourself C" Uses "fgets" but returns errors -


The code included is absolutely out of the book example, but it returns errors, is there anything that the book has done wrongly? I have #include & lt; String.h & gt; Before , only #include & lt; Stdio.h & gt; , but still what I am doing should be three arguments.

  #include & lt; Stdio.h & gt; #include & lt; String.h & gt; Int main (zero) {four buffer [256]; Printf ("Enter your name and & lt; enter & gt ;: \ n"); Fgets (buffer); Printf ("\ nYour name is% d characters and spaces!", Stellen (buffer)); Return 0; }   

the compiler says

  meaningful issue with fgets (buffer); - Very few arguments to call, than 3, 1 format String is a problem (Stellen (buffer)); - Specifies 'int' in format, but the logic type is 'unsigned long'    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -