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...
Type: Posts; User: xyphen
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...
Sorry, I forgot to insert a line while copying the code. I fixed it above.
Any ideas?
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];
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 :)
(reading your post right now)
int function, returns 1 in case of sucess
To be honest, No.
I'm new to this stuff.
Can you explain?
I've made some more tests.
If if call it this way (within the main function):
goToLogin();
it goes without problems.
Hi itCbitC,
It gives me the same problem!
Thank you. I got it working.
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...
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){
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) ||...
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’...
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*...