/ *
* \ brief Dictionary builder from file
*
* \ pre There is enough memory
* \ pre The file is first opened
*
* \ post If the file is open, the class instance has been initialized from
* from the dictionary file. Otherwise, we generate an empty class.
*
* \ exception bad_alloc if there is not enough memory
* This method calls chargeDicSyn!
* /
DicSyn::DicSyn(std::ifstream &file):
root(0), nbRadicals(0), groupesSynonymes()
{
chargeDicSyn(file);
}
I have to throw the exception bad_alloc
if there's not enough memory. I am really not an expert. How can I do it with this method?