Aug 27, 2012 at 10:39pm UTC
I am a beginner. I'm seeing code like:
// Simple doc
//<start id="simple">
BSONObjBuilder simple;
simple.genOID().append("username", "Jones").append( "zip", 10011 );
BSONObj doc = simple.obj();
cout << doc.jsonString();
//<end id="simple">
Are the comments //<start id="simple"> ... //<end id="simple"> simply a commenting convention or do they have a preprocessor or compiler function?
Thanks!
Aug 27, 2012 at 10:44pm UTC
Any line followed by //
is a comment, and is ignored by compilers.
Aug 27, 2012 at 10:45pm UTC
I've not worked with BSON/JSON (I'm aware it's for data interchange/serialisation) but, as far as C++ goes, those two lines will do absolutely nothing. :-)