Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Getting Started

Name conflicts have been a source of aggravation to both C and C++ developers. A name clash happens when a duplicate name with matching scope is found in two parts of your program. The most common occurrence can be found in different library packages. For example, a container class library will almost certainly declare and implement a List class. (You'll learn more about container classes when you learn about templates on Day 19, “Templates.”)

It is not a surprise to find a List class also being used in a windowing library. Suppose that you want to maintain a list of windows for your application. Further assume that you are using the List class found in the container class library. You declare an instance of the window library's List to hold your windows, and you discover that the member functions you want to call are not available. The compiler has matched your List declaration to the List container in the Standard Library, but what you really wanted is the List found in the vendor-specific window library.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial