|
-
July 8th, 2012, 04:02 AM
#3
Re: Public and private functions with no class?
If your quicksort function is not a template, you can put the implementation in a cpp file. The "private" functions can be placed inside an anonymous namespace to prevent anyone from using them outside the cpp file.
If you have a template function, then code that uses it will need to see the implementation, so the only thing you can do it put the "private" functions inside a namespace (e.g. "detail") that indicates that they are implementation details.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|