What is the value of NSNotFound in cocos2dx 3.17

What is the value of NSNotFound in cocos2dx 3.17
0

i am converting cocos2d project to cocos2dx i am stuck at NSNotFound
can any one help me to solve this ?
what should i write instead of NSNotFound

if(nPos != NSNotFound) {

            [self reorderChild:ammo.sprt z:1];
            if (nPos == 0) {
            [leftSnake insertObject:ammo atIndex:nPos+1];

Read up on NSNotFound, and you should be able to solve your issue pretty easily.

You’re going to run into a lot of issues if you’re just converting code without actually knowing what the purpose of it is. The bit of code you posted has no context, so it’s a little hard to help you.

Perhaps you should read that entire section of code, understand what it does, and re-create it in equivalent C++.

nPos is a integer variable so NSNotFound has some specific int value but i dont found it

I suggest that you forget about NSNotFound and figure out what that section of code is doing, then re-code it in C++. If your C++ knowledge is limited, then perhaps it’s a good idea to learn more about it before you try to convert code from Objective C to C++.

thanx i will try to learn