+ 1
C++: How to reset integers!?!?!?!?!?!?
How do you set integer to NULL in CPP. I can’t find an answer anywhere on the internet. PLEASE HELP ME!
4 Antworten
+ 3
Setting a pointer to NULL (nullptr) makes sense but setting an integer to NULL is a nonsense.
int integer = 0;
int *int_ptr = nullptr; //=NULL
+ 2
Why would you set an integer to null?
+ 2
NULL is not a number, but a pointer.
For this reason int n=NULL; doesn't make sense
0
Avinesh I want to be able to give a new input, so basicaly reset it. (I know you can’t “reset” it)