Should i employ null or 0?, C/C++ Programming

A: In C++, the definition of NULL is 0, thus there is only an aesthetic difference. I prefer to ignore macros, so I employ 0. Another difficulty with NULL is that people sometimes wrongly believe that it is different from 0 and/or not an integer. In pre-standard code, NULL was/is sometimes described to something unsuitable and thus had/has to be ignored. That's less common these days.

 

Posted Date: 3/20/2013 8:16:39 AM | Location : United States







Related Discussions:- Should i employ null or 0?, Assignment Help, Ask Question on Should i employ null or 0?, Get Answer, Expert's Help, Should i employ null or 0? Discussions

Write discussion on Should i employ null or 0?
Your posts are moderated
Related Questions
In this lab, please complete a given program to perform the following tasks: 1. Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with pag

1) Database: The database needs to be used for persistent storage of cars. For details of what information should be stored in the database, please see the description above. You

- Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles. The user should be able to view all DVD titles in his library, add and d

Question: (a) (i) Explain how class members can be accessed when using objects of the class. Use a suitable example to illustrate your answer. (ii) Explain how the privat

Explain a class to model a banking system. The function members should allow initializing the data members, a query to facilitate for account and a facility to deposit and with

Can I explicitly call a destructor if I've allocated my object with new?

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

c program to implement least cost method

Homework – Chapter 5 – Bowling Scores 33. Write a complete C++ program to do the following: The main program reads in and prints three bowling scores, score1, score2, and score

program to find if a no . is prime or not