fork(7) download
  1. #include <string>
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. unsigned char myVar[10] = "abcdefg";
  7. std::string res(myVar, myVar + 7);
  8. std::cout << res;
  9. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
abcdefg