User Profile

Collapse

Profile Sidebar

Collapse
gilly
gilly
Last Activity: Jun 3 '07, 06:07 AM
Joined: Mar 30 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gilly
    started a topic Stacks
    in C

    Stacks

    Is it possible to creat a linked list of structs?
    If so how would this be done?

    Advanced thanks
    Matt
    See more | Go to post

  • gilly
    started a topic Passing Value of a struct into a function
    in C

    Passing Value of a struct into a function

    Hi,

    just a quick question i have a function saving values into my struct, that all works but i do not know how to access these values in a different function to the one that saved them code is below.

    typedef struct InputT{
    double length;
    double startingangle;
    double angle;
    } Input;

    void input(){
    Input input;

    scanf("%lf", &input.lengt h);...
    See more | Go to post

  • gilly
    started a topic Structs
    in C

    Structs

    Hi,

    I'm trying to search the inputed data, using a second struct and printing the result if the two names match.
    Eg i have entered
    Joe BROWN 10/10/1000
    Chris BROWN 10/10/1000
    Joe BROWN 10/10/1000
    Matt Brown 10/10/1000

    then i enter JOE in the search string, and wish to scan the original struct for all joe's. However i have no idea how to do this, please if anyone could inform me on...
    See more | Go to post

  • gilly
    started a topic Getchar problem
    in C

    Getchar problem

    Hi,

    Sorry this may sound stupid but i cant figure it out.

    I was wonder how you use getchar to exit after enter has been pressed a multiple times.

    This is what i have but as its within a second while loop every it re-enters it reads the last time enter was pressed and exits. I just need it to allow me to re-enter values a second time.

    while(c! = '\n'){

    putchar(c);
    ...
    See more | Go to post

  • gilly
    replied to Getchar
    in C
    Thank You so much
    See more | Go to post

    Leave a comment:


  • gilly
    started a topic Getchar
    in C

    Getchar

    Sorry these may sound like stupid questions but how does getchar work? I know that it reads the data one by one in ASCII code but how can u tell it to store numbers only and print an error message if other characters are used? For an assignment i receive 5 dice values, which are entered, i'm have to display a error message if the numbers are entered with a space between them e.g 1 2 3 4 5 is ok but 1.2.3.4.5 is not. Sorry if this sounds stupid,...
    See more | Go to post
No activity results to display
Show More
Working...