Search:

Type: Posts; User: discostu

Search: Search took 0.01 seconds.

  1. ISO C++ forbids declaration of pthread_mutex_t with no type

    I'm getting weird errors for a semaphore class i'm writing. I don't know
    what's causing this and have searched all over google for the answer with no luck.
    Here's the code. please help! thanks!
    ...
  2. Replies
    4
    Views
    4,431

    yeah, I think that's right. I'm having trouble...

    yeah, I think that's right. I'm having trouble with the main function even though I made my own main function flex is generating the default one also in #if YY_MAIN tag. I've tried setting #define...
  3. Replies
    4
    Views
    4,431

    my copy of the book says it is a pointer: extern...

    my copy of the book says it is a pointer:
    extern char myinput[];
    extern char *myinputptr;
    extern int *myinputlim;

    weird. Maybe it's a typo in my copy?

    Anyway, I changed it to just be "extern...
  4. Replies
    4
    Views
    4,431

    error in flex code

    I've typed in the code from page 156 of the book and I get an error "invalid operands to binary -"



    extern char myinput[];
    extern char *myinputptr;
    extern int *myinputlim;

    int...
  5. Replies
    4
    Views
    4,431

    Please excuse my ignorance, I am new to yacc (I...

    Please excuse my ignorance, I am new to yacc (I have only written interpreters in Scheme before).

    Where do you put the input from strings code? what about the while loop? Also, what is function is...
  6. Replies
    4
    Views
    4,431

    Yacc Interpreter

    I've written a file parser.y which I ran throught bison to get parser.tab.c and then compiled that to get an executable ./parser which I can run and it works fine, but what I want to do is build an...
  7. Replies
    0
    Views
    1,526

    pthread_create start routine without args

    I have a hello world program of which I am trying to use pthreads. I don't know what to put for args since there aren't any. I've tried both NULL and (void*), and neither seem to work. ...
  8. Thanks for your help! Does this mean that any...

    Thanks for your help!
    Does this mean that any time you set a char* to a string constant, it is not writable? Because in the case of my replace function, it has an argument which is a char* and this...
  9. Replacing chars in Pointer String results in Segfault

    I've written a function which I want to replace all the spaces in a string with '-'. I get a Segmentation Fault when I run it. However, using gdb with a break point set in the function and stepping...
Results 1 to 9 of 9