Using Visual C++ 6.0

asked 2020-08-19T17:16:35.62+00:00
Sid Kraft 21 Reputation points

Using the c++ command gets(Data[Point].Comment); to input data from the keyboard and enter into a variable where the variable Comment is part of a structure. The program just ignores, no error or anything. Have the pre-defined library #include <stdio.h> where the command structure is supposed to be defined. When I look at the Comment variable in debug, the variable has been defined as 20 characters long and is empty, all blanks??? Any ideas, Sid Kraft

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,616 questions
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2020-08-19T17:42:59.38+00:00
    RLWA32 28,531 Reputation points

    Aside from the fact that VC++ 6.0 is long out of support and obsolete and there is no structure in its version of stdio.h that you describe -- did you remember that you must hit enter to terminate the keyboard input and that the gets function will happily overrun the buffer if too many characters are entered?

    No comments