LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to create a .txt file in bsagent.cc to see the results of leach simulaion in ns2? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-a-txt-file-in-bsagent-cc-to-see-the-results-of-leach-simulaion-in-ns2-4175517818/)

Mehedi Hasan 09-08-2014 01:50 AM

How to create a .txt file in bsagent.cc to see the results of leach simulaion in ns2?
 
Hello,
i want to see the average energy in a text file like

avg_energy.txt in each round.
I have set file functions to write on that file
but it doesn't work.

can any one help me, plz?

It's urgent...

I am in ending position..

thanks in advance.

knudfl 09-08-2014 05:42 AM

One thing is sure :
Just adding a text won't do, as no files.cc are used after creating the executable 'ns'.
All functions in files.cc are compiled into that one file : ns.
( And after doing the build command, files.cc could actually be deleted.)

If you want a new behavior from bsagent.cc,
the edited file must be compiled into a new executable 'ns'.

-


All times are GMT -5. The time now is 03:47 AM.