ArticleDirectory
Class 1
I introduced some programming things. Although I didn't speak a specific language, it is still very useful and can reach some resonance.
The security of C ++ is slightly worse than that of Java because it is expected to create C ++ProgramPersonnel are free, because it is often necessary to ensure that there are no errors in every place, it will increase the time to handle the problem at the same time.
C ++ itself does not have a graphics system, which means windows Mac has its own different graphics library, which is different from Java
Class 2
Introduce the differences between C ++ and Java syntax. It won't be Java, so I didn't take a closer look.
Class 3
String S = "hello"; for (INT I = 0; I <S. length (); I ++) s [I] = toupper (s [I]); cout <S <Endl; return 0;
This is a very common use of string, but you should note that it is a string value assigned to the string
Let's take a look at the constructor of the string class.
Inline string: string (const char * Str) {If (! Str) m_data = 0; else {m_data = new char [strlen (STR) + 1]; strcpy (m_data, STR );}}
This constructor should be called. Note that the strcpy function is used.
Char * strcpy (char * strdestination, const char * strsource) {assert (strdestination! = NULL & strsource! = NULL); char * strd = strdestination; while (* strd ++ = * strsource ++ )! = '\ 0'); Return strdestination ;}
It is actually a copy process, which converts the unmodifiable string value to a changeable string