c - error: comparison between a pointer and an integer -


I am trying to write a simple shell that can control redirection. However, I get "error: comparison between a pointer and an integer". I understand why I am getting the error, but I am unsure about fixing it. Args is declared as:

  stable char * args [512];   

This is the code where I'm getting the error:

  if (args == ' 

If the error is in line (Args == '& lt;') and if (Args == '>')

Any suggestion welcomed

I think args is a pointer char (if it is), then you Comparing pointer with single character. You can do this:

  if (args [0] == '& gt;') // then do something  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -