c++ programming.
Mostrar comentarios más antiguos
i have a question , for grade 10 students , in programming c++ . void main(void) , why the syntax is wrong?.
if anyone know please let me know,
i am going to paste the programming which i have done.
i done all the syntax correct but it`s coming wrong,
this one is my program.
this is from book. i don't see any difference.
Respuestas (2)
Bruno Luong
el 27 de Oct. de 2021
Editada: Bruno Luong
el 27 de Oct. de 2021
In C++ the main function signature should be
int main()
The void argument is for C (not C++).
Your code has illegal comma "," in the line #4
and missing semin-colon ";" at the end of the lines #5 & 8.
Rik
el 27 de Oct. de 2021
0 votos
You forgot two things:
- This is a Matlab forum and nothing in your question is related to Matlab
- Every line should end with a semicolon, and you have forgotten two of them, as the error messages point out.
2 comentarios
abeer hafeez
el 27 de Oct. de 2021
Rik
el 27 de Oct. de 2021
There are other websites devoted to that. Just like you don't go buy fruit in a clothing store.
But if this answer solved your issue, please consider marking it as accepted answer.
Categorías
Más información sobre External Language Interfaces en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!