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

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

node.js - Using Node without global install -

java - JavaScript + Thymeleaf - select onchange -