[ns] FILE * producing segmentation fault
Meeta Gupta
meeta.gupta at yahoo.com
Sun May 24 11:34:15 PDT 2009
hi users,
please help me with this problem. i am trying to implement a new agent. i have a method that is periodically invoked to write some statistics in a file. whenever i try to print something in the text file using fprintf i get a segmentation fault. anything without the file pointer seems to work. i have the following lines in my c++ code....
void myAgent:: print_info()
{
FILE * fp;
fp = fopen("/Documents/ns-allinone-2.31/text.txt", "a");
}
More information about the Ns-users
mailing list