Opening a file for appending and binary

I have a file I am trying to append to and have the data stream be binary. From reading on this website's documentation, I found this:

These constants are defined in the ios_base class as public members. Therefore, they can be refered to either directly by their name as ios_base members (like ios_base::in) or by using any of their inherited classes or instantiated objects, like for example ios::ate or cout.out.


at http://www.cplusplus.com/reference/iostream/ios_base/openmode.html

Which led me to create this:
1
2
outData.open(path.c_str(), ios::app);
outData.binary();


Which gives the error:
error: 'std::ios_base::binary' cannot be used as a function


I understand what the error message means, what I don't understand is why its an error given the information above.

Any ideas?

Last edited on
Scratch that. By force of habit I added parenthesis to the flag call. I'd delete the post, but it may prove useful to others (I couldn't find anything about this when I searched)
Topic archived. No new replies allowed.