devxlogo

Tip Bank

Declaring a bit field for a variable

Question: Is there a way to explicitly declare the number of bits to allocate to a specific variable? For example, can I declare an integer that would be stored in

What is pure virtual function?

Question: Can you explain and give me examples of pure virtual function? What is the difference between pure virtual function and virtual function? Answer: A pure virtual function is a

Clearing character arrays

Question: How do you clear a character array? Answer: You can use the standard C library memset function. Here is an example:void foo (){ char t [20]; cin >> t;

Constructors and virtual functions

Question: I have been doing some programming in C++ and recently decided I would try some Windows programming with the Microsoft Foundation Classes. This isn’t a question about Windows but

Compilation Warning

Question: I got a warning when I compiled my C++ program onHP-UX:Line 219: Warning: Namespace is a future reserved keyword (215).What does this mean? Answer: It means exactly what it

undefined vs. null

Question:   Answer: You are probably familiar with a special value in JavaScript called null. This is a value you can assign to a variable when you want to indicate

reading input field numbers

Question:   Answer: JavaScript can be used to access values in web form input fields. This is possible because JavaScript treats input fields as objects with several properties. One of