I am using a Graphics Library called Irrlicht at some point i have to write this code
if(!device){
//error code here`
}
i am not in the main function but want to close the application when this error happens please keep in mind that I am a beginner so this question might sound dumb i see some people do this:
int main(){
if(!device){
return 1;
}
return 0;
}
i am not in the main function and want to exit the application outside of the main function