Ok, so I have researched as much as my tiny brain can take in. I have yet to find an answer that helps my problem. Trying to write a calculator that raises the base to a number no higher than 214783647. And as of now I'm jut trying to get the program to function without set values. But this is what the debugger says:
main.cpp: In function 'int main()':
main.cpp:25:11: error: invalid type argument of unary '*' (have 'int')
result = *x;
Here is the code.
#include <iostream>
using namespace std;
int solve(int, int, char);
int main()
{
int x = 0;
int y = 0;
int result = 1;
cout << "Enter your base:";
cin >> x;
cout << "Enter the number to raise base by:";
cin >> y;
for (x = 0; result <= y; result++)
{
result = *x;
}
cout << result;
return 0;
}
I am at the very beginning stages of C++, but I can take all constructive criticism.
FIXED!! I'm not sure if this allowed, but I finally have the program fully functioning thanks to y'all!