not sure if is ns2 problem or c++ issue,

i did a function call testingprint(); somewhere else

int ff2 = 0;
void
Myprog::testingprint()
{
        if(ff2 == 0){
#ifdef DEBUG
        fprintf(stderr, "I am from %d node TESTING \n", index);
#endif
        printf("AT(%d) hello TESTING \n", index);
        testingprint2();
        ff2 = 1;
        }
}

i notice that if my printf are within if else statements which are in a
function(testingprint()), only node 0 will be printed

I am from 0 node TESTING 
AT(0) hello TESTING

, but if i remove the if else statements, all my nodes will print.

I am from 0 node TESTING 
AT(0) hello TESTING 
I am from 1 node TESTING 
AT(1) hello TESTING 
I am from 2 node TESTING 
AT(2) hello TESTING 

im only having this problem when there is if else in a function, if the if
else is not in a function but in the main, there is no prob :( anyone knows
whats wrong?

-- 
View this message in context: 
http://old.nabble.com/Strange-problem-with-ns2-printf-tp28947016p28947016.html
Sent from the ns-users mailing list archive at Nabble.com.

Reply via email to