Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Input Validation in C and C++
Subject:   Use C++ String Library
Date:   2005-03-07 07:28:14
From:   masterhackman
If you must use C strings, first get the user input with the C++ library, and then allocate the correct amount of memory for your new C string generated by using cstr() . If the string buffer size is too large, thrown an exception.


- CS101 experience