You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include<iostream>// The header file from single_include
#include"tabulate.hpp"usingnamespacetabulate;intmain() {
Table table;
table.add_row({"cell"});
auto [rows, cols] = table.shape();
std::cout << rows << "" << cols << std::endl;
}
In my environment it prints "8 3".
$ g++ test_tabulate.cpp -o test
$ ./test
8 3
I don't think that matters but I use g++ (GCC) 12.2.0 on CentOS 7
I didn't go deep into details but I believe it prints some numbers that depend on the size of the buffer that is created in TableInternal::shape() method.
Is it possible to fix/add a method that would return an actual number of rows and columns that were added to the table?
Hi!
I expect this code to print "1 1"
In my environment it prints "8 3".
$ g++ test_tabulate.cpp -o test $ ./test 8 3
I don't think that matters but I use
g++ (GCC) 12.2.0
onCentOS 7
I didn't go deep into details but I believe it prints some numbers that depend on the size of the buffer that is created in
TableInternal::shape()
method.Is it possible to fix/add a method that would return an actual number of rows and columns that were added to the table?
This worked for me.
The text was updated successfully, but these errors were encountered: