If you don't want to mess around with the API (i.e. SetNamedSecurityInfo), you might be able to bypass the prompt like so:
echo y|cacls filename /d everyone
Since echo is a builtin, to call that command line from your program, you'd probably have to run:
cmd.exe /c echo y|cacls filename /d everyone