Search:

Type: Posts; User: desmond5

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    9,194

    Dissecting an Excel XML spreadsheet

    I have a worksheet saved in XML Spreadsheet 2003 file format.

    I’m supposed to read a specific value from it, given it’s cell address, such as „A5“ or „B3“. As I have almost-absolutely no previous...
  2. Thread: Nested strtok

    by desmond5
    Replies
    3
    Views
    4,157

    Nested strtok

    Consider this loop:



    while (t != NULL)
    {
    t = strtok(NULL, tbc);
    if (t != NULL)
    {
    if(time_check_legal(t)) row_add_key(_row, t); // <--- MESSES UP
  3. Replies
    13
    Views
    20,767

    I just wanted to produce a correct error message...

    I just wanted to produce a correct error message instead of the program crashing. How should I proceed with that, then ?
  4. Replies
    13
    Views
    20,767

    How about checking byte order mark ? Is that...

    How about checking byte order mark ? Is that doable ?
  5. Replies
    17
    Views
    16,143

    Hard from who's point of view ?

    Hard from who's point of view ?
  6. Replies
    13
    Views
    20,767

    No question about that. I shrinked the program a...

    No question about that. I shrinked the program a lot and uploaded the source and the input file that produces the error here: http://www.andresraieste.pri.ee/ttu/IABB/err/



    So..the workaround...
  7. Replies
    13
    Views
    20,767

    I am trying to reproduce the error by cutting out...

    I am trying to reproduce the error by cutting out stuff from the program that aren't related to it. Maybe that will help.
  8. Replies
    13
    Views
    20,767

    Ofcourse. It's quite lenghty so I'll post a link...

    Ofcourse. It's quite lenghty so I'll post a link where I uploaded it instead:

    http://www.andresraieste.pri.ee/ttu/IABB/infor2/CPeatus.c

    Beware though, as the code is commented in my native...
  9. Replies
    17
    Views
    16,143

    I don't study IT at college (though I most...

    I don't study IT at college (though I most probably plan to), so it's not a homework. I'm still in highschool and it's just a hobby of mine.

    And..um..what kind of homework would be to remove...
  10. Replies
    13
    Views
    20,767

    How to check file encoding ?

    Hi,

    I made a program that inputs a text file and analyses it (line by line with fgets in a loop, main string functions used are strlen, strtok, strchar, strcpy, strcmp). When the input file is...
  11. Replies
    17
    Views
    16,143

    Remove whitespaces from char*

    Hy,

    How can I remove whitespaces from a string ? I.e. like trim() does in PHP. I'm in trouble with making my own.
  12. Replies
    30
    Views
    2,929

    Many thanks :) One more thing..I add three...

    Many thanks :)

    One more thing..I add three elements to the array. How is it that it has 4 ? I even cannot access the fourth element..



    #include <stdio.h>
    #include <string.h>
    #include...
  13. Replies
    30
    Views
    2,929

    Really ? I don't know what else I need to...

    Really ? I don't know what else I need to include..



    #include <stdio.h>
    #include <string.h>

    typedef struct
    {
    char *name;
  14. Replies
    30
    Views
    2,929

    Yeah..but it gives a warning "[Warning]...

    Yeah..but it gives a warning "[Warning] assignment makes pointer from integer without a cast" on this line: _row->keys = realloc( (n_keys+1)*sizeof(*_row->keys) );
  15. Replies
    30
    Views
    2,929

    But what if I wish to add a key after I have...

    But what if I wish to add a key after I have already allocated the memory ? Like if I have a function add_key(row *_row, char *key); ? I tried to reallocate but I failed. How would you accomplish...
  16. Replies
    30
    Views
    2,929

    And on 64bit machine ? My question was...

    And on 64bit machine ?



    My question was answered :) Thankyou :) If anything comes up, I'll just add to the thread.
  17. Replies
    30
    Views
    2,929

    Dynamic array (or something like that) in C

    Hello,

    I have a structure like this:



    typedef struct
    {
    char *name;
    char keys[20][6];
  18. Replies
    7
    Views
    2,438

    Any pointers how to solve this puzzle in general...

    Any pointers how to solve this puzzle in general (not using fixed size arrays and so on) ?
  19. Replies
    7
    Views
    1,578

    Char array and char *

    If I have an array of char and a char pointer, how can I make the compatible ?




    void something(char *mstring)
    {
    char list[i] = ... // "Hello World"
    mstring = list; ?????...
  20. Replies
    7
    Views
    2,438

    Reading words and analyzing words from file

    I'm trying to analyze a file, given with a structure like this:

    Key1 param1 param2 param3
    Key2 param4 param5 param6 param7
    Key3 param8 param9

    The file has unknown number of...
  21. Replies
    8
    Views
    2,288

    By a stupid mistake.

    By a stupid mistake.
  22. Replies
    8
    Views
    2,288

    Still confused with pointers

    I was trying to return the position of a character in a string. The code below doesn't work because of the int *c, if I remove the *, it works fine. Just out of curiosity, how would it be possible to...
  23. Replies
    9
    Views
    37,841

    What does "const" in function parameter do ?

    I'm not sure. What's the difference between:


    int somemethod(char *a1, char *a2)

    ...and:


    int somemethod(const char *a1, const char *a2) ?
  24. Oh, thanks :) Another question, how can I...

    Oh, thanks :)

    Another question, how can I check if all characters in string are the same (ie "aaaaaa") ?
  25. What's the point of using int a = atoi("0") ? I...

    What's the point of using int a = atoi("0") ? I dont't want to convert "0" to 0 but the first (or second or fourth or whatever) character in the string to int.

    If I wanted to loop throught all...
Results 1 to 25 of 31
Page 1 of 2 1 2