Search:

Type: Posts; User: yougene

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. including .h file in .c file of the same name?

    There is a #define that I need in both of my source files. How do I do this without getting a duplicate error?

    Do I include the .h file into the .c file of the same name?
  2. Replies
    6
    Views
    1,787

    This is an example from the Make manual so I...

    This is an example from the Make manual so I think it is supposed to be a working example.


    I just realized that all the targets are object files which means no linking will be done. That makes...
  3. Replies
    6
    Views
    1,787

    I got this code from the Make manual. make...

    I got this code from the Make manual.
    make Deduces - GNU `make'



    objects = main.o kbd.o command.o display.o \
    insert.o search.o files.o utils.o

    edit :...
  4. Replies
    6
    Views
    1,787

    Help me understand GNU Make please

    What is the implicit rule for handling a header file as a prerequisite?

    e.g


    main.o : defs.h
    kbd.o : defs.h command.h
    command.o : defs.h command.h
    display.o : defs.h...
  5. Yeah, it's GCC

    Yeah, it's GCC
  6. mmmm, C voodoo Thanks guys

    mmmm, C voodoo

    Thanks guys
  7. Thanks for all the helpful replies ...

    Thanks for all the helpful replies


    @laserlight
    if the types of parameters are unspecified why does this produce an error for me?


    #include <stdio.h>

    void function1();
  8. If a function prototype parameter field is left empty does it assume an int?

    Take this code as an example


    #include <stdio.h>

    void function1();
    void function2( void );

    int main()
    {
  9. Replies
    4
    Views
    1,514

    How do you find header of a function?

    Lets say you see a function whose code isn't provided in that file and is probably in one of the headers. How would you go about figuring out which header that function belongs to. Obviously you...
  10. Replies
    8
    Views
    2,737

    Ahhh ok. So I actually have a pseudo-function...

    Ahhh ok. So I actually have a pseudo-function
    PARAMS ((char *filename))
    which gets converted to ARGS which really just means whatever is inside the parameter.


    What purpose is doing all this...
  11. Replies
    8
    Views
    2,737

    Thanks this has all been insightful. Let me...

    Thanks this has all been insightful.

    Let me show what I do understand so far so maybe someone can fill in the gaps.


    void (*print_object_filename) PARAMS ((char *filename));
    for example

    ...
  12. Replies
    8
    Views
    2,737

    Never seen this syntax before. Help?

    I'm taking a look at all the good stuff GNU has made and I ran into something I have never seen before.

    For example line 166 in binutils-2.9.1/bin-utils/nm.c you have this



    /* Support for...
  13. Replies
    4
    Views
    6,210

    Understanding the stack and heap

    I always see the stack and heap mentioned in CS books. I'd like to understand more about them.

    Are heaps and stacks different areas of memory, or different ways to use memory?

    What would be a...
  14. Replies
    4
    Views
    1,222

    thanks

    thanks
  15. Replies
    4
    Views
    1,222

    No, what does -lm do?

    No, what does -lm do?
  16. Replies
    4
    Views
    1,222

    pow() refuses to take two variables

    It works fine with 1 variable one value. I don't understand why.



    /tmp/cc4KSEcQ.o: In function `main':
    test.c:(.text+0x2f): undefined reference to `pow'
    collect2: ld returned 1 exit status
  17. Replies
    6
    Views
    65,889

    I guess I have much more to learn

    I guess I have much more to learn
  18. Replies
    6
    Views
    65,889

    >>cas Thanks. How did you find the error so...

    >>cas

    Thanks. How did you find the error so fast?
  19. Replies
    6
    Views
    65,889

    double free or corruption (fasttop)

    I've never gotten an error like this before. Could someone tell me what it means?
    I think the error is contained in the convertToPostfix function.



    *** glibc detected *** ./a.out: double free...
  20. Replies
    2
    Views
    7,346

    undefined reference to `isDigit'

    eugene@eugene-laptop:~/cfiles$ cc 12.12.c
    /tmp/cc7U4qkP.o: In function `convertToPostfix':
    12.12.c:(.text+0xd6): undefined reference to `isDigit'
    collect2: ld returned 1 exit status


    Isn't...
  21. What would be good form? I was originally...

    What would be good form?

    I was originally going to use if, else if, else. Both have the same short-coming in my mind although in different ways.

    The way I did it has the possibility of not...
  22. 1. Will this cause problems if I do pass...

    1. Will this cause problems if I do pass user-input?

    2. The function is going to be used in conjunction with isOperator().
  23. Ahh thank you. This brings up a more precise...

    Ahh thank you.

    This brings up a more precise question.
    1. Which part of the statement is the "initializer element" ?
    2. What does it mean that it's "non-computable at load-time" ?
  24. warning: initializer element is not computable at load time

    What does this warning mean?


    12.12.c:54: warning: initializer element is not computable at load time
    12.12.c:54: warning: initializer element is not computable at load time



    Look at the...
  25. Replies
    2
    Views
    3,238

    1. if ( conductor != 0 ) is a roundabout way of...

    1.
    if ( conductor != 0 )
    is a roundabout way of checking if malloc was able to allocate memory to root. If no memory was allocated malloc returns a NULL pointer address.

    2.
    The code at hand is...
Results 1 to 25 of 182
Page 1 of 8 1 2 3 4