| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
|  |  | |||
Home -> Community -> Usenet -> c.d.o.server -> Can somebody explain use of VARCHAR in C program
Can somebody please give an explanation of VARCHAR in C programs.
i am reading an input file that is of fixed lengt. Several records are of fixed lenght and have spaces. I read that by using the VARCHAR you can avoid having to use a function to elimate white space.
But VARCHAR is not a C reserved word. How is it used. An exapmle follows
  int     emp_number;
  char    temp[20];
  VARCHAR emp_name[20];
  /* get values for input host variables */
  printf("Employee number? ");
  gets(temp);
  emp_number = atoi(temp);
  printf("Employee name? ");
  gets(emp_name.arr);
  emp_name.len = strlen(emp_name.arr);
How does the last line fit in with use of the VARCHAR? Is it needed for its use?
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Tue Aug 05 1997 - 00:00:00 CDT
|  |  |