Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
Working just from your code fragment, it is difficult to work out what your problem is: the only reference to strcmp you have does not use argv at all - it uses an array of strings you create and fill.But are you sure you are using it right?strcmp(argument[0], "cd")will return 0 if the...
11 Jan 2013Richard MacCutchan
You should always check the documentation[^] first. As you can see, the strcmp() function returns an integer value not a boolean as your code assumes.There is no definition of the variables (buffer, argument) in your code; where are they defined?You are calling the strcmp() function before...
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.