Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned int doSomething(unsigned int *x, int y)
- {
- if(1) //works
- if(y) //reports the error given below
- //I use any one of the ifs above, and not both at a time
- return ((*x) + y); //works fine when if(1) is used, not otherwise
- }
- int main() {
- unsigned int x = 10;
- doSomething(&x, 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement