For example,
void getPtr(int* ptr){
getPtr(ptr+5); //ok
}
void getRef(int& ref){
getRef(ref+5); //not ok
}
This is.
When implementing algorithms or data structures, we usually use pointers Other than that, I usually use references
583 Uncaught (inpromise) Error on Electron: An object could not be cloned
562 Who developed the "avformat-59.dll" that comes with FFmpeg?
853 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
563 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.