Search:

Type: Posts; User: sjalesho

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,480

    Then it's giving the syntax error parse...

    Then it's giving the syntax error



    parse error before '(' token
  2. Replies
    9
    Views
    1,480

    Thantos, Many thanks. A pointer to a pointer...

    Thantos,

    Many thanks. A pointer to a pointer gives me a headache, but I think I got that one right by not omitting a pointer.

    My compiler is giving me the same errors for these 2 lines:

    ...
  3. Replies
    9
    Views
    1,480

    The structures are defined in my headerfile. ...

    The structures are defined in my headerfile.

    Entry:


    typedef struct {
    char *source;
    Target_node *trans;
    } Entry;
  4. Replies
    9
    Views
    1,480

    A confusing syntax error

    Here is a snippet of my program.



    void
    add_trans(Dict *dict, char *source, char *target)
    {
    if (source != dict->*entry->source){
    dict->*entry->source = source;
    dict->size++;
  5. Thread: void main()

    by sjalesho
    Replies
    15
    Views
    3,019

    #include is always between < and > No idea...

    #include

    is always between < and >

    No idea why, I'm novice also...hope to learn C by just simply reading the topics. :D
  6. Replies
    7
    Views
    1,941

    I'm using Cygwin on Windows. I just compile using...

    I'm using Cygwin on Windows. I just compile using gcc <program.c> and I create the files in Windows notebook and save them as program.c

    I don't have these advanced options to let the compiler show...
  7. Replies
    7
    Views
    1,941

    How do I do that?

    How do I do that?
  8. Replies
    7
    Views
    1,941

    Could someone explain this code, string

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

    #define MAX_LEN 80

    void reverse_string(char str[])
    {
    int i, len = strlen(str);
    for(i = 0; i < (len / 2); i++)
    {
  9. Number of words multiplied by the number of lines in Linux

    You can do that with "wc",

    1. wc - l for the number of lines
    2. wc -w for the number of words

    Hoe should one combine these 2, let's say if I want to multiply the number of words with the...
  10. Replies
    15
    Views
    5,534

    Re: Reverese a String without loop

    what is the string? :o

    I'm new to this stuff too, but I have done some exercises with reversing digits, which could be done using remainder operator (%) or you could try this:

    printf("%d%d%d",...
  11. Replies
    1
    Views
    3,347

    Help needed with backtracking

    #include <stdio.h>

    /* Entry FREE means the position is free to be traversed.
    * Entry WALL means the position can never be traversed.
    * Entry USED means the position has already been visited, ...
  12. Replies
    2
    Views
    4,482

    Thanks :)

    Thanks :)
  13. Replies
    2
    Views
    4,482

    Printing 2 digits

    Hello,

    using "%2d" print 2 digits, however when the digit is one number, the 0 is not printed, but is left blank. How can I print 01, 02, 03 etc instead of 1, 2 , 3 etc....?

    Thanks
  14. Thanks a lot! :) I'll remember your tips and...

    Thanks a lot! :)

    I'll remember your tips and advice! :)
  15. Thanks, the problem is that index is giving me...

    Thanks, the problem is that index is giving me the value "2008958736" for each positive value I enter. I have no iedea where that number is coming from, what I do know is that something is wrong, but...
  16. Binary search using recursion...don't know what I am doing wrong

    I need to write a recursive function to perform a binary search on an array of 30.

    This is what I got so far, I think I have done everything correctly, but I can't see the error in the code.

    ...
  17. Replies
    6
    Views
    2,556

    Try this: #include int main()...

    Try this:



    #include <stdlib.h>
    int main()
    {
    system(“PAUSE”);
    return 0;
    }
  18. Thanks a lot, my code is now finished and I'll...

    Thanks a lot, my code is now finished and I'll adjust the comments. :)
  19. I have also initialised the high_score and...

    I have also initialised the high_score and low_score, so basically I need to initialise 2 more? This is what I was thinking, but I didn't know how to do it. I'll try it out.

    edit: the high_score...
  20. Extracting lowest and highest score from array

    I have posted before on this forum in this thread. This is basically a follow-up, but the old thread is not needed, because this is an isolated problom.

    This is what I got now to extract the...
  21. Replies
    15
    Views
    4,229

    hmm, can't you just reverse 4 digits with 2 loops...

    hmm, can't you just reverse 4 digits with 2 loops and arrays, one counting up, one counting down? I have been reading your codes and it looks so difficult.

    It could be also done this way I think:...
  22. Replies
    10
    Views
    7,166

    Thanks a lot! Reading your code I see that my way...

    Thanks a lot! Reading your code I see that my way of trying to make it a code was totally wrong. I'm really learning from your example. I started to learn C some 4 weeks ago, before I never heard of...
  23. Replies
    10
    Views
    7,166

    I don't have much now yet, because I do not know...

    I don't have much now yet, because I do not know how to "simply spit the grades out".


    #include <stdio.h>
    #define NR_STUDENTS 5
    #define NR_QUIZES 5

    main()
    {
    int score[NR_STUDENTS]...
  24. Replies
    10
    Views
    7,166

    Yes it is, I found this site while I was doing...

    Yes it is, I found this site while I was doing Google on arrays. I have read the tutorial of this site on arrays and other C tutorials, which I already know. Taking that knowlegde into practise is...
  25. Replies
    10
    Views
    7,166

    I'm terribly sorry, dumb question. :o I've...

    I'm terribly sorry, dumb question. :o

    I've searched Google and I know what arrays are and how For loops work, but because everything is going so fast I don't know how to implement and combine all...
Results 1 to 25 of 28
Page 1 of 2 1 2