DEV Community

Discussion on: Understanding Rust as a C++ developer

Collapse
 
rafal98 profile image
rafal98

Hi, amazing Rust review

Just a small typo here:
// C++
const char* t = "some text";
std::string s(text);
std::string a = s + " in C++";

should be

// C++
const char* *text *= "some text";
std::string s(text);
std::string a = s + " in C++";

Collapse
 
daaitch profile image
Philipp Renoth

Hey @rafal98 ,

happy you like it and you're right! Fixed, but I did it like in the Rust code and give the t :).

cheers Philipp