mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
Updated V for CPP developers (markdown)
parent
cd71c3f61d
commit
c03985df96
@ -6,7 +6,7 @@
|
||||
```cpp
|
||||
#include <iostream>
|
||||
int main() {
|
||||
std::cout < "Hello World!" < "\n";
|
||||
std::cout << "Hello World!" < "\n";
|
||||
}
|
||||
```
|
||||
|
||||
@ -65,7 +65,7 @@ numbers << 5
|
||||
```cpp
|
||||
std::copy(numbers.begin(), numbers.end(),
|
||||
std::ostream_iterator<int>(std::cout, " "));
|
||||
std::cout < '\n';
|
||||
std::cout << '\n';
|
||||
```
|
||||
|
||||
</td>
|
||||
@ -109,7 +109,7 @@ std::ifstream f("path");
|
||||
std::string text;
|
||||
text.assign(std::istreambuf_iterator<char>(f), {});
|
||||
if (!f)
|
||||
std::cerr < "error reading from file\n";
|
||||
std::cerr << "error reading from file\n";
|
||||
```
|
||||
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user