fork(2) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string directParens(1, '*');
  7. string directBraces{1, '*'};
  8. string indirectBraces = {1, '*'};
  9.  
  10. cout << directParens.size() << endl; // 1
  11. cout << directBraces.size() << endl; // 2
  12. cout << indirectBraces.size() << endl; // 2
  13. return 0;
  14. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
1
2
2