O
Ojan Jafarkhani
Guest
Hi;
I am learning about C++ functions and I confront to some problems , so I need some help.
Here is my code:
#include "stdafx.h"
int main()
{
int num1;
printf("Enter your number.");
scanf_s("%d", &num1);
printf("\nYour answer is:");
printf("%d", sqr(num1));
}
int sqr(int x)
{
int y;
y = x*x;
return;
}
When I run this application , I confront to the following error:
"error C3861: 'sqr': identifier not found"
What can I do to solve this problem ?
Continue reading...
I am learning about C++ functions and I confront to some problems , so I need some help.
Here is my code:
#include "stdafx.h"
int main()
{
int num1;
printf("Enter your number.");
scanf_s("%d", &num1);
printf("\nYour answer is:");
printf("%d", sqr(num1));
}
int sqr(int x)
{
int y;
y = x*x;
return;
}
When I run this application , I confront to the following error:
"error C3861: 'sqr': identifier not found"
What can I do to solve this problem ?
Continue reading...