so guys!
what u say is use of ++ and -- in passing values to a function is not a good coding practice.
use temporary variables instead to get a more defined and predictable result. :)
But how do...
Type: Posts; User: pornoshome
so guys!
what u say is use of ++ and -- in passing values to a function is not a good coding practice.
use temporary variables instead to get a more defined and predictable result. :)
But how do...
I did read the link! :)
So you mean to say that when I use ++j or j-- in different compilers for different OS's I can expect a different output.
But how will this help when I am passing values to...
To vart:
even if i use this code in C, this will give the same output
#include <stdio.h>
int main()
{
int j = 5;
printf("%d\t%d\t%d\t%d\t", j++,j--,--j,++j);
just add the following line after the include statements and check whether the module compiles.
MODULE_LICENSE("Dual BSD/GPL");
The code is given below
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int i = 4;
int j = 5;
//cout<<++i<<"\t"<<j--<<"\t"<<++i<<"\t"<<++j<<endl;