Questions tagged [getc]

Anything related to C or C++ standard library functions `getc` (C) or `std::getc` (C++). These functions are used to read a single character from a stream.

Anything related to C or C++ standard library functions getc (defined in <stdio.h> C standard header) or std::getc (defined in <cstdio> C++ standard header). These functions are used to read a single character from a stream and they can also be implemented as C-preprocessor macros.

See CPPreference.com:

91 questions
-3
votes
1 answer

How to get float from file using getc() in C?

I have a file with ";" as a separator, i want to get some characters and save them as float, I've come up with something like this: int c; char help[10]; float x; while(getc(c)!=';'){ strcpy(help, c); } float = atof(help);
Khawker
  • 11
  • 1
1 2 3 4 5 6
7