Cannot delete windows partition from mac

First of all, try both repair disk (if grayed, then verify), and repair disk permissions. If you are still unable, boot to single-user mode (Command +S on boot) and type in the following.

/sbin/fsck -fy

Press enter, then type reboot.

If it still does not work, then do the following, but be sure to backup:

Hold Command +R on boot to start Recovery mode, select disk utility and do it from there. If it is grayed out, select the partition scheme to 1 (or 2 if you need Untitled)


Warning:

There have been reports that setting the partition scheme to 1 or 2 can erase all your data. Be sure to backup before attempting to do this.

Okay, so when I had a similar problem, I used Terminal, these two guides, and this command line to get it done.

diskutil mergePartitions JHFS+ NewName {first disk identifier in range} {last disk identifier in range}

I used diskutil list to make sure I knew which drives I was merging, because you can't use the Disk Utility names (Macintosh HD, BOOTCAMP), you need the disk identifier (which looks like disk0, disk0s1, disk0s2, etc). I'm going to guess your HD would be disk0s2 and the BC is disk0s3, if that were true the next thing you'd put into Terminal is:

diskutil mergePartitions JHFS+ NewName disk0s2 disk0s3

The JHFS+ will reformat the Windows drive when it merges and NewName should be replaced with whatever you wanna name your HD.

Mind you, doing the above should leave you with 2 partitions: NewName and Untitled. If you wanted to merge all three partitions then you would use HD and Untitled in your command line.