Problem in the code given in description.Why is the semicolon placed after printsomething ?It is a function & no ; shud be used | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Problem in the code given in description.Why is the semicolon placed after printsomething ?It is a function & no ; shud be used

#include <iostream> using namespace std; void printSomething() { cout << "Hi there!"; } int main() { printSomething();// here semicolon should not be used in my view }

6th Jun 2019, 1:03 PM
Gaurav Pratap singh
Gaurav Pratap singh - avatar
1 Answer
+ 2
you can email the creator of C++, he can make some amendment if you can give some convincing argument which you can pass to a function, wink hehe
6th Jun 2019, 1:06 PM
✳AsterisK✳
✳AsterisK✳ - avatar