C++ putting a 2d array of floats into a char*
- by sam
Hello,
I'm trying to take a 2d vector of floats (input) and put them into a char* (output) in c++.
void foo(const std::vector<std::vector<float> > &input, char* &output )
{
char charBuf[sizeof(output)];
int counter = 0;
for(unsigned int i=0; i<input.size(); i++)
{
for(unsigned int p=0; p<input.at(i).size(); p++)
{
//what the heck goes here
}
}