Search:

Type: Posts; User: xyphen

Search: Search took 0.00 seconds.

  1. Making some tests with a variable "command"...

    Making some tests with a variable "command" instead of using argv, I made it work with the command "Exit"

    if I now enter let's say "a", it won't give me the current location like before.

    I...
  2. Sorry, I forgot to insert a line while copying...

    Sorry, I forgot to insert a line while copying the code. I fixed it above.

    Any ideas?
  3. Own Shell: Displaying prompt and write a command

    Hi,

    I'm building my own shell, I've search on the forums but I couldn't find this anywhere.

    I have something like this:



    void showPrompt(){
    char buff[200];
  4. OK i got it! I'm just starting on this so sorry...

    OK i got it! I'm just starting on this so sorry for my incompetence.

    getchar(); between the first printf and fgets solved the problem

    Thanks everyone for the great help :)
  5. (reading your post right now)

    (reading your post right now)
  6. int function, returns 1 in case of sucess

    int function, returns 1 in case of sucess
  7. To be honest, No. I'm new to this stuff. ...

    To be honest, No.

    I'm new to this stuff.

    Can you explain?
  8. I've made some more tests. If if call it this...

    I've made some more tests.

    If if call it this way (within the main function):



    goToLogin();


    it goes without problems.
  9. Hi itCbitC, It gives me the same problem!

    Hi itCbitC,

    It gives me the same problem!
  10. Thank you. I got it working.

    Thank you. I got it working.
  11. Basic question - How to wait before asking another input?

    Hi everyone,

    Within a function A, I have a printf that asks for a login and another one that asks for a password.

    When I call that function from the main function, it works... it waits for me...
  12. You are right. Sorry for the missunderstanding. ...

    You are right. Sorry for the missunderstanding.

    How can I use fgets on this line than?


    while(((auxusers[MAX] = fgetc(fileusers)) != EOF) || (auxpassword[MAX] = fgetc(filepassword)) != EOF){
  13. quzah, I have fgets like you have on my first...

    quzah, I have fgets like you have on my first post on this thread.

    I think itCbitC is referring to the fgetc I have here:


    while(((auxusers[MAX] = fgetc(fileusers)) != EOF) ||...
  14. I tried, the compiler now shows the following: ...

    I tried, the compiler now shows the following:

    myshell.c:43: warning: passing argument 1 of ‘fgets’ from incompatible pointer type
    myshell.c:43: error: too few arguments to function ‘fgets’...
  15. Login: Read login from a file and compare to the input

    Hi everyone,

    I'm building a login function. I have two files - one with the user login and other with the password (needs to be this way).



    int loginn(){

    FILE* fileusers;
    FILE*...
Results 1 to 15 of 15