[A] Added operator[] to C++ API

This commit is contained in:
seleznevae
2018-08-12 12:00:07 +03:00
parent 1873309019
commit e141f5b35f
5 changed files with 317 additions and 7 deletions

View File

@@ -37,10 +37,16 @@ void different_cell_options_example(void)
void fill_table_with_data_example(void)
{
fort::Table table;
table << fort::header
<< "N" << "Planet" << "Speed, km/s" << "Temperature, K" << fort::endr;
table << fort::header;
/* Fill each cell with operator[] */
table [0][0] = "N";
table [0][1] = "Planet";
table [0][2] = "Speed, km/s";
table [0][3] = "Temperature, K";
table << fort::endr;
/* Fill with iostream << operator */
/* Fill with iostream operator<< */
table << 1 << "Mercury" << 47.362 << 340 << fort::endr;
/* Fill row explicitly with strings */