Difference between foo(void) and foo() in C/C++

Asked 2 years ago, Updated 2 years ago, 89 views

How are these two different? If the two are the same, why is there a void factor?

c c++ arguments void

2022-09-22 14:06

1 Answers

is interpreted differently in C and C++.

Because

You must specify (void) to maintain consistency in the header that C/C++ writes in common.


2022-09-22 14:06

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.