Search:

Type: Posts; User: tkks

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,604

    Well, I feel like an idiot. Had this guy: ...

    Well, I feel like an idiot.

    Had this guy:


    *(op_file+i)

    in a debug message right after the code I posted.

    Sorry.
  2. Replies
    3
    Views
    1,604

    argv to string segmentation fault

    Hi all,

    I have this piece of code that causes segmentation fault:


    .... check argv[2] exists ....

    std::string* op_file;
    ...
    std::cout << "argv[2] is: " << argv[2] << std::endl;
  3. Replies
    4
    Views
    4,508

    Oh, I see. Thanks.

    Oh, I see.
    Thanks.
  4. Replies
    4
    Views
    4,508

    Yes, yes, in fact I did think so! I guess I...

    Yes, yes, in fact I did think so! I guess I should go over pointers and arrays again.

    Thanks a lot.
  5. Replies
    4
    Views
    4,508

    Confusing array of char pointer type mismatch

    Hi All,

    I have an array of char pointers:

    char *input_args[MAX_ARGS];

    and I have this function:

    BOOL parseArgs(char **input_args[], input arg_num);
  6. Replies
    0
    Views
    1,642

    Handling signals in Linux

    Hi All,

    I am still trying to write a custom shell and I want to handle SIGINT and SIGTSTP, so I assigned them handlers (like it is customary for my people):



    signal(SIGINT, sigint_handler);...
  7. Replies
    29
    Views
    3,104

    OK, thanks a lot everyone. You helped me a lot...

    OK, thanks a lot everyone. You helped me a lot with this!
  8. Replies
    29
    Views
    3,104

    OK kmdv I came here to ask for advice and not to...

    OK kmdv I came here to ask for advice and not to argue with you about my knowledge in the theory of compilation ( though I did get 98 in that course :D ).
    In case you don't know in bison it is...
  9. Replies
    29
    Views
    3,104

    kmdv I do know what a parser is, and I have built...

    kmdv I do know what a parser is, and I have built compilers before in c using flex & bison. This time I decided to write it manually in c++ so I could improve my c++ skills.
    Why do you think I am...
  10. Replies
    29
    Views
    3,104

    kmdv if I understand you correctly you are...

    kmdv if I understand you correctly you are suggesting to use something like this:



    class token{
    private:
    ...
    token_type type;

    int line_number;
  11. Replies
    29
    Views
    3,104

    KMDV I am afraid that I don't quite understand...

    KMDV I am afraid that I don't quite understand what you mean.

    What do you mean ?

    I think it will be a little difficult to solve mathematical expressions at such early stage if I keep the...
  12. Replies
    29
    Views
    3,104

    I see. I think all things considered I will stick...

    I see. I think all things considered I will stick with early mathematical expression reduction in this case.

    Thanks for your replays.
  13. Replies
    29
    Views
    3,104

    I see what you mean, my initial thought was...

    I see what you mean, my initial thought was writing a class Lex that will get an input string and will produce tokens. The token_value can be a string or a number so that Lex can produce...
  14. Replies
    29
    Views
    3,104

    Thanks for all your replies, I changed it to...

    Thanks for all your replies, I changed it to something like that:



    template<class T>
    class token{
    private:
    ...
    token_type type;
  15. Replies
    29
    Views
    3,104

    Unions and void pointers in c++

    Hi, all

    This is a coding conventions question. I am working on a lexical analyzer and I have something like this:



    class token{
    private:
    ...
    token_type type;
Results 1 to 15 of 15