|
From: Pascal <p.t...@ti...> - 2003-12-02 09:56:57
|
Hello,
hmbayati,welcome in this newsgroup,is that possible you to send post in
"texte" format and not in "html"?
The warning message is what your are not compiled a runing program.
You are make a function :" void square()" that return not a value (void).
If you will sea a result use:
int main()
{
//code here....
}
----------------------------------------------------------------------------
--------------------------
#include <iostream>
#include <stdlib.h>
using namespace std;//<-- for using namespace to the standard librairie c++
int main()
{
std::cout << "hello, you are now in hadi's program.\n";
int num;
std::cout << "enter a number and I will give you its square.\n";
std::cin >> num;
std::cout << "the square of " <<num<<" is : "<<num * num << endl;
system("PAUSE");//<-- make a pose for view the result in the console
return 0;//<-- return a value (0 for example) due to the "int main()"
}
----------------------------------------------------------------------------
---------------------------
there are another way to make this but this the more simply i say.
|