Search Result

Collapse
2 results in 0.0039 seconds.
Keywords
Members
Tags
scanf
  •  

  • giacomomarciani
    started a topic separator in scanf
    in C

    separator in scanf

    How can I let a scanf recognize some separators?
    For example:
    user input a stream via scanf:
    Giacomo Marciani,male,2 7/06/1990

    The program should recognize "," and "/" as separators, and assign Giacomo to a char*, Marciani to another char*,male to another char*,27 to a int,06 to another int and 1990 to another int.
    See more | Go to post

  • Gcc doesn't seem to get my scanf right, but Visual Studio does, what's wrong?

    First I actually thought there was something wrong with my programming skills. But after I compiled the same code using Visual Studio, it worked. So here's the code that doesn't seem to be working right with gcc compilers, but they do compile. Note I'm using the Cygwin 3.4.4 version of gcc and 4.5.1 version of gcc from MinGW.

    Code:
    #include <stdio.h>
    #include <math.h>
    int main()
    {
        long double r = 0;
    ...
    See more | Go to post
    Last edited by Bangonkali; Dec 11 '10, 07:47 AM. Reason: Revised Formatting
Working...