+ 1
Ask Coding C++
#include <iostream> using namespace std; int main(){ void main(){ int x; int y; int *p=&x; int *q=&y; *p =46; *q=39; x=x+y; cout << *p <<" " *q << endl; } }
4 Respostas
+ 5
So, what is the question?
... Why do you have a main function with no return type, declared inside a main function which returns int? Do you need help to correct your code? Do you need help explaining the output of the code (given that the errors are corrected) ?
+ 1
You entered " " followed by *q, but it you had to enter " " << *q at the cout line.
0
Sorry, I have error code
0
Yes, help to correct code