Advertisement
Guest User

Untitled

a guest
Feb 25th, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. unsigned int doSomething(unsigned int *x, int y)
  2. {
  3.     if(1) //works
  4.     if(y) //reports the error given below
  5.  
  6.     //I use any one of the ifs above, and not both at a time
  7.  
  8.     return ((*x) + y); //works fine when if(1) is used, not otherwise
  9. }
  10.  
  11. int main() {
  12.         unsigned int x = 10;
  13.         doSomething(&x, 1);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement