fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4.  
  5. void cfunc(char const *cstr)
  6. {
  7. std::cout << cstr << std::endl;
  8. }
  9.  
  10. int main()
  11. {
  12. std::vector<std::string> nums;
  13. for(std::size_t i = 0; i < 50; ++i)
  14. {
  15. nums.push_back(std::to_string(i));
  16. }
  17. for(auto const &str : nums)
  18. {
  19. cfunc(str.c_str());
  20. }
  21. }
  22.  
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49