Ask Coding C++ | SoloLearn: Learn to code for FREE!

+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; } }

2/3/2019 11:18:35 AM

Achmad Imannudin

4 Answers

New Answer

+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