//some exceptions accept a string, so it's easy
throw std::invalid_argument("INVALID VALUE : " + std::to_string(val));
//if it only accept char* you'd have to do something like this
throw std::except( (std::string("ERROR VALUE ") + std::to_string(val)).c_str() )
Code Example |
---|
Cpp :: draw rect outline sdl2 |
Cpp :: ue4 ftext to int |
Cpp :: integer to string c++ |
Cpp :: cout hex value |
Cpp :: ostream was not declared in this scope |
Cpp :: compile notepad++ c++ |
Cpp :: c++ wait for user input |
Cpp :: how to sort a string in c++ |
Cpp :: read variable to file cpp |
Cpp :: c++ stream string into fiel |
Cpp :: capacity() in c++ |
Cpp :: xmake set binary name |
Cpp :: c++ file to string |
Cpp :: how to access struct variables in c++ |
Cpp :: convert vector into array c++ |
Cpp :: c++ check if file exits |
Cpp :: or in cpp |
Cpp :: c++ show current time |
Cpp :: loop through char in string c++ |
Cpp :: c++ map iterator |
Cpp :: apply pca to dataframe |
Cpp :: remove first element from vector c++ |
Cpp :: change abstract title name latex |
Cpp :: max of two elements c++ |
Cpp :: c++ typedef |
Cpp :: c++ nested switch statements |
Cpp :: ue4 c++ enumaeration |
Cpp :: how to get an element in a list c++ |
Cpp :: string iterator in c++ |
Cpp :: strlen in c++ |