Abstract programming learning notes

Source: Internet
Author: User
ArticleDirectory
    • Class 1
    • Class 2
    • Class 3
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.