I have seen some c++ where there is code as follows:
myText = "This is the first part";
my Text = "This is the second part";
My concern is first is this correct? What happens to the pointer myText when the code goes out of scope? Shouldn't myText be initialized somehow first? I've never seen this done this way and also Visual Studio will spit out warnings.
Any suggestions as the proper way to code the above?
Just elaborating on some things already said...In the context of C++ the example is making use of a deprecated feature. Literal strings are constant and assigning a non-const pointer to a constant literal
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices. I was specifically interested in an app I could use on my android phone. The be…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.