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

Asked 1 years ago, Updated 1 years ago, 75 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.