if(pDirent->d_name == "..")
That's just plain wrong. It looks like you want to compare two C-strings (i.e. check if the characters in each C-string are the same or not), but you're actually comparing pointers.
If you have C-strings to compare, which these are (well, a char array and a "string literal" - char pointer to a const array of char), use a function that's made for it.