Well, I feel like an idiot.
Had this guy:
*(op_file+i)
in a debug message right after the code I posted.
Sorry.
Type: Posts; User: tkks
Well, I feel like an idiot.
Had this guy:
*(op_file+i)
in a debug message right after the code I posted.
Sorry.
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;
Oh, I see.
Thanks.
Yes, yes, in fact I did think so! I guess I should go over pointers and arrays again.
Thanks a lot.
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);
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);...
OK, thanks a lot everyone. You helped me a lot with this!
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...
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...
kmdv if I understand you correctly you are suggesting to use something like this:
class token{
private:
...
token_type type;
int line_number;
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...
I see. I think all things considered I will stick with early mathematical expression reduction in this case.
Thanks for your replays.
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...
Thanks for all your replies, I changed it to something like that:
template<class T>
class token{
private:
...
token_type type;
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;