Skip to content

Commit a33726e

Browse files
authored
fix tutorial issues regarding constructor with () and some typos (acs-pa#28)
1 parent aff6bf5 commit a33726e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tutorial/cpp/cpp.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ class Gigel {
181181
182182
int main() {
183183
Gigel g; // print "Gigel()"
184-
Gigel g2(); // print "Gigel()"
185184
Gigel g4(5); // print "Gigel(5)"
186185
}
187186
```
@@ -289,8 +288,8 @@ void func(T& a, T&b) {
289288
func<int>(123, 456);
290289
// example of template function
291290
// which has 2 parameters of type K and V
292-
template<typename K, typename B>
293-
void func(K &a, V &v) {
291+
template<typename K, typename V>
292+
void func(K &k, V &v) {
294293
// ...
295294
}
296295
// usage example for int and struct Gigel

0 commit comments

Comments
 (0)