readArgFromFile’ was not declared in this scope
Hello friends
I tried following example to calculate different delay between nodes first I created a file named config.txt which has values Code:
//config.txt Code:
//sim.cc [code] g++ -o sim sim.cc i got error Code:
In function ‘int main(int, char**)’: |
What's readArgFromFile? Where is it defined?
|
Thanks for reply
I have taken this example from book Introduction to NS-2 Teerwat_Issariyakul I do not know how to read arguments from text file. and how to use them in c++ I have to read number of nodes from txt file and also link delay between them |
As far as I know, there is no such function in any of the standard C++ libraries. Either the book you are reading provides its definition, or you'll have to implement it yourself. For reading from files, you'll need either methods from fstream (alternatively, you may use the old style plain C cstdio).
If you're unsure about how to do this, I strongly recommend that you familiarise yourself with the basics of C++ (the sticky thread here in the programming section has a lot of resources for learning C/C++) before continuing with your book. |
Ok millgates
|
All times are GMT -5. The time now is 10:17 AM. |