Search:

Type: Posts; User: jimmychauck

Search: Search took 0.00 seconds.

  1. Replies
    18
    Views
    19,322

    Indeed, I would agree with CommonTater, but time...

    Indeed, I would agree with CommonTater, but time is running up for me, sometimes we have to cope with life, tragic I didn't have the full length of time required to learn C properly.
  2. Replies
    18
    Views
    19,322

    Thankyou everyone for their enthusiasm of...

    Thankyou everyone for their enthusiasm of helping, unfortunately I am having extreme difficulty with the array operation in C. Was never successful in understanding how array actually functions in C,...
  3. Replies
    18
    Views
    19,322

    Thanks everyone for the help, however still no...

    Thanks everyone for the help, however still no luck with the dynamic allocation.

    This is the current program


    #define TRUE = 1
    #include <stdio.h>
    #include <math.h>
    main()
    { char...
  4. Replies
    18
    Views
    19,322

    hmm.. yes, but the whole point I am trying to...

    hmm.. yes, but the whole point I am trying to stress here is dynamic. The size of the array is unknown until the first line of the input file is read.

    I tried to do


    float arraydat[row][col];...
  5. Replies
    18
    Views
    19,322

    This batch of code I tested, and is working ...

    This batch of code I tested, and is working

    printf("please enter the number of elements you want to appear in the array: \n");
    scanf("%d", &a);
    array1 = (float*) malloc(a * sizeof array1);
    ...
  6. Replies
    18
    Views
    19,322

    ok, so I think I will try the following ...

    ok, so I think I will try the following


    fscanf(fp, "%d, %d", &row, &column) /*to get the number of columns in the array*/

    char formatstring[4 * column - 2] /*declare format string array*/
    ...
  7. Replies
    18
    Views
    19,322

    Ok, but before I continue, could I know if the...

    Ok, but before I continue, could I know if the fscanf() function takes a string variable as the format argument? Or is there actually string argument in C? or does C treat a character array as a...
  8. Replies
    18
    Views
    19,322

    Reading CSV file

    I was thinking of reading some data from a file and perform calculation on it. The job has been broken down as follow:

    1. welcome message and ask for input filename
    2. read header from file that...
  9. Replies
    7
    Views
    1,453

    Sorry for the confusion caused, now I found what...

    Sorry for the confusion caused, now I found what went wrong, when I do #include <math.h>, everything was solved. because I didn't see it in the lib directory I thought it didn't exist, but later I...
  10. Replies
    7
    Views
    1,453

    Thanks for Adak's and Vincent's reply, I was...

    Thanks for Adak's and Vincent's reply, I was afraid the packaging was the problem.

    For Vincent's info, the code I pasted was a chopped down version of my original program, some parts I chopped off...
  11. Replies
    7
    Views
    1,453

    [newbie question] C setup

    Hello everyone, I am a intermediate programmer that had done some programming with PHP, ASP, SQL, Fortran, Matlab and VB and now wanting to learn C.

    however I am coming through some very awkward...
Results 1 to 11 of 12