Do I have to use references in C++.? -


i have kinda deep c experience c++ beginner. references seem easier use pointers, drives me crazy. think references can replaced pointers. in case, pointers not hard because spent tons of times studying them. common among c++ programmers use references or recommended??

one thing references prevent null pointers. if want ensure parameter passed function not null, can pass reference.

void func(int& i); // cannot null 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -