Good C++ practices

Pages: 1234
there are no small letters in my post. they are only small if you make them small.
Nathan and Bobby you should stop arguing over grammar. You are getting way off topic on yet another thread. Let me put this back on topic:
http://www.cplusplus.com/forum/lounge/127166/#msg688151

There is also a WIP faq for this site that could come in handy.
http://www.cplusplus.com/faq/
yeah im sorry. also there is the webkit one.
http://www.webkit.org/coding/coding-style.html
Is it just me or is there "Under construction" written over here: http://www.cplusplus.com/faq/style/
Yes, the FAQ on this site is still under active development (and from the look of things, probably won't be ready for a while).
As I mentioned it is a work in progress(WIP).
closed account (iAk3T05o)
It looks good although i don't understand the code under "strings & arrays". I believe it will be sorted out when it's done. A good reference.
@ Nathan2222: The code is very clear and understandable. What part do you not understand?
closed account (iAk3T05o)
I can't seem to find it. It had a lot of
 
bool::
are you sure? i just did ctrl+f for just bool and it found nothing. also i dont think you can legally do bool::anything in c++. although, i would appreciate it if one of the more knowledgable members backed me up or corrected me on this
closed account (iAk3T05o)
I've still not found it.
@little bobby: i hope i find it to confirm. :(
@ Bobby: bool is a datatype. It is neither a class nor a namespace. So you cannot do bool::something and get away with it ;).
Last edited on
Stormboy is right, bool is a datatype. There is no part of this site (outside of his post and your reply) that has bool:: in it.
Last edited on
closed account (iAk3T05o)
I've found it :). It's under strings & arrays, under that, you'll find comparing strings without case sensitivity and you'll see the codes. I was confusing things because bool was the datatype of that thing.
It was boost:: i was seeing.
boost is a library. You use boost:: to access something in the boost namespace.
bool is a datatype. It is neither a class nor a namespace. So you cannot do bool::something and get away with it ;).
thats what i was saying. i didnt think you could but im no expert, so i just wanted to make sure.

You use boost:: to access something in the boost namespace

except, for whatever reason, when its not in actual code they refer to a library as boost.name, for example boost.any
If they are doing boost.any that means boost is a class/struct object accessing a member.

1
2
3
4
5
6
struct someName{
         std::string name;
};

someName boost;
boost.name;

For the boost library it uses boost:: due to it being the namespace for the library. Unless I'm misunderstanding what you mean by boost.any.
yes you are. if they arent referencing actual code, they do it like this:
to do such and such, you would use boost.foo to do that.
@ Little Bobby Tables:
Where do they refer it to as boost.something? In their documentation?
im sorry... im wrong. i just went to check, and i couldnt find them doing that except in the <title> tag. i must be thinking of another library
Pages: 1234