#include "String.h" ecci::String test(const ecci::String& s1, const ecci::String& s2) { (void)s2; return s1; } ecci::String test2() { return "jiji"; } void printLetter(const ecci::String& text, size_t index) { std::cout << "\ns1[3]=='" << text[index] << "'" << std::endl; } #include int main(int argc, char* argv[]) { ecci::String s0; std::cout << "s0=[" << s0 << "]" << std::endl; ecci::String s1 = "hola"; std::cout << "s1=[" << s1 << "]" << std::endl; ecci::String s2(s1); std::cout << "s2=[" << s2 << "]" << std::endl; ecci::String s3{":) !!!", 2}; std::cout << "s3=[" << s3 << "]" << std::endl; s0 = s3; std::cout << "s0=[" << s0 << "]" << std::endl; std::cerr << "\nString s4 = test2()\n"; ecci::String s4 = test2(); std::cout << "s4=[" << s4 << "]\n" << std::endl; std::cerr << "\ns3 = test2()\n"; s3 = test2(); std::cout << "s3=[" << s3 << "]" << std::endl; printLetter(s1, 3); std::cerr << "s1[0] = 'b'\n"; s1[0] = 'b'; std::cout << "s1=[" << s1 << "]\n" << std::endl; ecci::String s5 = /*'>' +*/ s1 + ' ' + "mundo?"; std::cout << s5 << std::endl; (void)argc; ecci::String filename = argv[1]; //filename.replace(".csv", ".md"); //FILE* inputFile = fopen( filename, "r"); FILE* inputFile = fopen( filename.c_str(), "r"); if ( ! inputFile ) std::cerr << "could not open " << filename << std::endl; fclose(inputFile); #ifdef TESTING std::cout << "\nInstance count: " << ecci::String::getInstanceCount() << std::endl; #endif }