Forum Replies Created
tiongsquare
Participant
@CharlesPandian wrote:
certainly it will not be a problem with ns2 or C++ . your logical error will be the cause of this error (logical error).
Actually, the question was not clear.
“i notice that if my printf are within if else statements which are in a function(testingprint()), only node 0 will be printed
but if i remove the if else statements, all my nodes will print.”
You are checking the value of ff2 in the if statement. so in the first case, ff2 seems to be having value 0 if and only if the index=0. So it is printing for node 0 only.
If you are removing the if, then all it will not consider the value ff2 and so may print everything.
[/i]
thanks for yr reply, i realise its my coding problem 😳
Viewing 1 post (of 1 total)