Code cleanup and moving functions out of classes that do not belong

This commit is contained in:
amazing-username
2017-07-09 21:44:30 -05:00
parent 6c1f92ea30
commit 33c23cfc10
11 changed files with 53 additions and 59 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef CONVERSIONS_H_
#define CONVERSIONS_H_
#include<string>
#include<sstream>
class Conversions
{
public:
Conversions() = default;
std::string cstringToString(char[], const int);
private:
};
std::string Conversions::cstringToString(char tmp[], const int size)
{
std::string tmpString{};
std::stringstream cToS{};
for (auto index =0; index!=size; ++ index)
cToS << tmp[index];
cToS >> tmpString;
return tmpString;
}
#endif