Search:

Type: Posts; User: Crashgr

Search: Search took 0.00 seconds.

  1. Replies
    0
    Views
    2,302

    Bison, flex and flow control

    Hello!

    The last month I am looking all over the internet for a tutorial on creating a simple scripting language with flow control (for, while, if) using bison and flex (or yacc and lex).

    Can...
  2. Replies
    12
    Views
    3,881

    Thank you all for your replies!! ;)

    Thank you all for your replies!! ;)
  3. Replies
    12
    Views
    3,881

    There must be an easier way.... What bash shell...

    There must be an easier way.... What bash shell does to retrieve my login name? It surely doesn't use the $USER variable.
  4. Replies
    12
    Views
    3,881

    Perspective, thank you for your answer, however I...

    Perspective, thank you for your answer, however I believe that $USER is not safe at all. any user can change the value of this variable.

    As I said, I'm looking for a portable and secure way to...
  5. Replies
    12
    Views
    3,881

    Identifying Who Logged In & getlogin()

    Hello!!

    What is the best way to get the username of the logged in user? I used getlogin() and it worked fine with these distros :

    Solaris 8
    Suse 9

    It also worked perfectly at cygwin....
  6. Replies
    1
    Views
    964

    Number of Tokens

    Hello!!

    I'm looking for a function which accepts a string as input and returns the number of the tokens of the string. Is there any ready function for this? If not, what is the correct algorithm...
  7. Thread: A file parser

    by Crashgr
    Replies
    3
    Views
    1,129

    Thank you jlou for your answer! I edited the...

    Thank you jlou for your answer!

    I edited the code and now it is correct. You guest right!! Code got lost when I moved it to my post! :)

    I tried removing the ignore and let the getline read the...
  8. Thread: A file parser

    by Crashgr
    Replies
    3
    Views
    1,129

    A file parser

    Hello!!

    I'm trying to write a file parser. I have just began and I stuck.

    Let's assume that I have a file called 'profile.txt'. This file contains :

    "


    hello
  9. Replies
    2
    Views
    4,254

    grrrrr!! I'm stupid!! Thank you jlou!! That was...

    grrrrr!! I'm stupid!! Thank you jlou!! That was the problem!! And I swear that, this was the first thing i checked!! ;) Thank you again.
  10. Replies
    2
    Views
    4,254

    c++ strings. input validation

    I have this problem in my program! I need a function that fixes the input. If the string has white characters at the beginning. For example : if s=" hello" , i want to fix the string to be :...
Results 1 to 10 of 10