Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: DanJC
  • Content: Threads
  • Order by date
  1. DanJC

    Forms in C part 2

    Ok peeps, C++ makes it a lot easier to create forms/fields than C does so here is some code that may help C programmers: //define field structure struct field { int h_pos, v_pos, width; char caption[35]; char *value; } form1[10]; //display form void disp_form( struct field form[], int...
  2. DanJC

    With

    I am lazy!! I don't want to have to write out a struct's full name any time I want to reference one of it's members. Is there a with statement (or equivalent) in C e.g. struct mystruct { int item1; char item2; float item3; } struct1[20]; for(index = 0;index <20; index++) { with...
  3. DanJC

    Forms in C

    I am attempting to create a form in C using the following concept. I create a field struct: struct field { int index; void *point_to_data; char *caption; int hor_pos, ver_pos; } myform[15]; I also create a record struct to store data; struct myrec { char *item1; char *item2...
  4. DanJC

    Date entry evaluation

    Folks, There are probably better ways than this but I hope this will spark some ideas. If you want to test a users date input for validity, try using this to define your years!! Struct Year { struct month { int no_of_days; char *name; //optional field if you want month names }...
  5. DanJC

    Validating input

    Can anyone tell me how to test input for a datatype? I want to be able to read input into a float variable but also to identify if the user input is not compatible with a float before the program throws out an error and dies. If I read into a char * then I can't convert the input to a float...

Part and Inventory Search

Back
Top