| | |
Unary Operators
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Please don't double post. Someone knowledgable in what you're asking will get to you as soon as they can.
prefix notation like --B does the operation BEFORE using the value in an expression, (pre as in do it before), whereas postfix like A++ does the operator AFTER using the value in the expression (post as in after).
In your expression above, you should 'play compiler' and see what gets computed FIRST, then what gets computed NEXT, and so on.
In your expression above, you should 'play compiler' and see what gets computed FIRST, then what gets computed NEXT, and so on.
•
•
Join Date: Jul 2004
Posts: 6
Reputation:
Solved Threads: 0
Hello, I'm trying an exercise. For some reason it's not working. There is a regualr error and one fatal errors.
-Error LNK2005: _main already defined in Conditional_Operators.obj.
-Fatal error LNK1169: one or more multiply defined symbols found.
The code:
#include <iostream>
using namespace std;
double Square (double Value);
main ()
{
double Number, SquaredNumber;
Number = 5;
SquaredNumber = Square (Number);
cout << SquaredNumber << endl;
return 0;
}
double Square (double Value)
{
double SquareReturn;
SquareReturn = Value * Value;
return SquareReturn;
}
-Error LNK2005: _main already defined in Conditional_Operators.obj.
-Fatal error LNK1169: one or more multiply defined symbols found.
The code:
#include <iostream>
using namespace std;
double Square (double Value);
main ()
{
double Number, SquaredNumber;
Number = 5;
SquaredNumber = Square (Number);
cout << SquaredNumber << endl;
return 0;
}
double Square (double Value)
{
double SquareReturn;
SquareReturn = Value * Value;
return SquareReturn;
}
#include <iostream> using namespace std; int double Square (double Value); int main () { double Number, SquaredNumber; Number = 5; SquaredNumber = Square (Number); cout << SquaredNumber << endl; return 0; } int double Square (double Value) { double SquareReturn; SquareReturn = Value * Value; return SquareReturn; }
Real Eyes Realize Real Lies
My Resume
My Resume
![]() |
Similar Threads
- Definitions Some C++ operators (C++)
- please helpme i have small doubt in post and pre increment operators (C)
- Unary operators (C++)
Other Threads in the C++ Forum
- Previous Thread: Unary operators
- Next Thread: Error C2734: 'Value' : const obje
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets







