1.cin.getline()此函数可读取整行,包括前导和嵌入的空格,并将其存储在字符串对象中。
2.strlen()获取字符数组长度
3.ASCII A:65 a:97

2047:【例5.16】过滤空格
过滤多余的空格。一个句子中也许有多个连续空格,过滤掉多余的空格,只留下一个空格。

#include <iostream>
#include <cstring>
using namespace std;
char s[202];
char s2[202];
int main()
{
    cin.getline(s,200);    
    int len=strlen(s);
    
    s2[0]=s[0];
    int n2=1;
    for(int n=1;n<len;n++){
        
        if(!(s[n]==' '&&s[n-1]==' ')){
            s2[n2++]=s[n];
            
            
        }
        
        
    }

cout<<s2;
    
    return 0;
}

对给定的n(1≤n≤20)个国家名(国家名字长度不超过20),按其字母的顺序输出。

#include<iostream>
using std::cin;
using std::cout;
using std::endl;
#include<string>
using std::string;
#include<algorithm>
using std::swap;
 
int main()
{
    int n = 0;
    string a[20];
    cin >> n;
 
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }
 
    for (int i = 0; i < n - 1; ++i)
    {
        for (int j = 0; j < n - i - 1; ++j)
        {
            if (a[j] > a[j + 1])
            {
//直接比较大小就是比较首字母的ascii码
                swap(a[j], a[j + 1]);
            }
        }
    }
 
    for (int i = 0; i < n; ++i)
    {
        cout << a[i]<<endl;
    }
}

隱私政策

我们尊重並保護所有使用服務用戶的個人隱私權。為了給您提供更準確,更有個性化的服務,我们會按照本隱私權政策的規定使用和披露您的個人信息。但我们將以高度的勤勉,審慎義務對待這些信息。除本隱私權政策另有規定外,在未徵得您事先許可的情況下,我们不會將這些信息對外披露或向第三方提供.我们會不時更新本隱私權政策。

您在同意我们服務使用協議之時,即視為您已經同意本隱私權政策全部內容。本隱私權政策屬於我们服務使用協議不可分割的一部分。

1.適用範圍

一)在您註冊我们帳號時,您根據我们要求提供的個人註冊信息;

B)在您使用我们網絡服務,或訪問我们平台網頁時,我们自動接收並記錄您的瀏覽器和計算機上的信息,包括但不限於您的IP地址,瀏覽器的類型,使用的語言,訪問日期和時間,軟硬件特徵信息及您需求的網頁記錄等數據;

c)中我们通過合法途徑從商業夥伴處取得的用戶個人數據。

您了解並同意,以下信息不適用本隱私權政策:

一個)您在使用我们平台提供的搜索服務時輸入的關鍵字信息;

b)中我们收集到的您在我们發布的有關信息數據,包括但不限於參與活動,成交信息及評價詳情;

c)中違反法律規定或違反我们規則行為及我们已對您採取的措施。

2.信息使用

一個)我们不會向任何無關第三方提供,出售,出租,分享或交易您的個人信息,除非事先得到您的許可,或該第三方和我们(含我们關聯公司)單獨或共同為您提供服務,且在該服務結束後,其將被禁止訪問包括其以前能夠訪問的所有這些資料。

b)中我们亦不允許任何第三方以任何手段收集,編輯,出售或者無償傳播您的個人信息。任何我们平台用戶如從事上述活動,壹經發現,我们有權立即終止與該用戶的服務協議。

C)為服務用戶的目的,我们可能通過使用您的個人信息,向您提供您感興趣的信息,包括但不限於向您發出產品和服務信息,或者與我们合作夥伴共享信息以便他們向您發送有關其產品和服務的信息(後者需要您的事先同意)。

3.信息披露

在如下情況下,我们將依據您的個人意願或法律的規定全部或部分的披露您的個人信息:1)經您事先同意,向第三方披露;

b)中為提供您所要求的產品和服務,而必須和第三方分享您的個人信息;

C)根據法律的有關規定,或者行政或司法機構的要求,向第三方或者行政,司法機構披露;

d)如您出現違反中國有關法律,法規或者我们服務協議或相關規則的情況,需要向第三方披露;

E)如您是適格的知識產權投訴人並已提起投訴,應被投訴人要求,向被投訴人披露,以便雙方處理可能的權利糾紛;

F)在我们平台上創建的某壹交易中,如交易任何壹方履行或部分履行交易義務並提出信息披露請求的,我们有權決定向該用戶提供其交易對方的聯絡方式等必要信息,以促成交易的完成或糾紛的解決。

克)其它我们根據法律,法規或者網站政策認為合適的披露。

4.信息存儲和交換

我们收集的有關您的信息和資料將保存在我们及(或)其關聯公司的服務器上,這些信息和資料可能傳送至您所在國家,地區或我们收集信息和資料所在地的境外並在境外被訪問,存儲和展示。

  1. Cookie的使用

一)在您未拒絕接受餅乾的情況下,我们會在您的計算機上設定或取用餅乾,以便您能登錄或使用依賴於餅乾的我们平台服務或功能.我们使用的cookie可為您提供更加周到的個性化服務,包括推廣服務。

b)中您有權選擇接受或拒絕接受餅乾。您可以通過修改瀏覽器設置的方式拒絕接受餅乾。但如果您選擇拒絕接受餅乾,則您可能無法登錄或使用依賴於餅乾的我们網絡服務或功能。

C)通過我们所設的cookie所得得的有關信息,將適用本政策。

6.信息安全

一個)我们帳號均有安全保護功能,請妥善保管您的用戶名及密碼信息.我们將通過對用戶密碼進行加密等安全措施確保您的信息不丟失,不被濫用和變造。儘管有前述安全措施,但同時也請您注意在信息網絡上不存在“完善的安全措施”。

B)在使用我们網絡服務進行網上交易時,您不可避免的要向交易對方或潛在的交易對方披露自己的個人信息,如聯絡方式或者郵政地址。請您妥善保護自己的個人信息,僅在必要的情形下向他人提供。如您發現自己的個人信息洩密,尤其是我们用戶名及密碼發生洩露,請您立即聯絡我们客服,以便我们採取相應措施。

Privacy Policy
App respects and protects the privacy of all users who use the service. In order to provide you with more accurate and personalized services, App will use and disclose your personal information in accordance with this Privacy Policy. However, App will treat this information with a high degree of diligence and prudence. Except as otherwise provided in this Privacy Policy, App will not disclose or provide this information to third parties without your prior permission. App will update this Privacy Policy from time to time.

By agreeing to the App Service Use Agreement, you are deemed to have agreed to the entire content of this Privacy Policy. This Privacy Policy is an integral part of the App Service Use Agreement.

  1. Scope of application

a) Personal registration information provided by App when you register your App account;

b) When you use the App web service or access the App platform web page, App automatically receives and records information on your browser and computer, including but not limited to your IP address, browser type, language used, access Date and time, hardware and software feature information and web page records you need;

c) User personal data obtained by App from a business partner through legal means.

You understand and agree that the following information does not apply to this Privacy Policy:

a) Keyword information that you enter when using the search service provided by the App platform;

b) Information about the information you have collected at App collected by App, including but not limited to participation activities, transaction information and evaluation details;

c) Violation of the law or violation of the App rules and actions taken by App.

  1. Information use

a) App will not provide, sell, rent, share or trade your personal information to any unrelated third party, unless you have your permission in advance, or the third party and App (including App affiliates) provide services to you individually or jointly. And after the service is over, it will be barred from accessing all of the material that it has previously been able to access.

b) App also does not allow any third party to collect, edit, sell or distribute your personal information by any means. Any user of the App platform who engages in the above activities, has found that App has the right to immediately terminate the service agreement with the user.

c) For the purpose of serving the user, App may use the information you use to provide you with information of interest to you, including but not limited to sending you product and service information, or sharing information with App partners so that they can send you Information about its products and services (the latter requires your prior consent).

  1. Information disclosure

In the following circumstances, App will disclose your personal information in whole or in part according to your personal wishes or the law: a) disclose to third parties with your prior consent;

b) in order to provide the products and services you request, you must share your personal information with third parties;

c) disclosed to third parties or administrative or judicial authorities in accordance with the relevant provisions of the law or the requirements of the administrative or judicial authorities;

d) If you are in violation of relevant Chinese laws, regulations or App service agreement or related rules, you need to disclose it to third parties;

e) If you are a qualified IP Complainant and have filed a complaint, it should be disclosed to the Respondent at the request of the Complainant so that both parties can handle possible rights disputes;

f) In a transaction created on the App platform, if any transaction performs or partially fulfills the transaction obligation and requests for information disclosure, App has the right to decide to provide the user with the necessary information such as the contact information of the counterparty. Facilitate the completion of the transaction or the resolution of the dispute.

g) Other disclosures that App considers appropriate in accordance with laws, regulations or website policies.

  1. Information storage and exchange

The information and materials collected by App will be kept on the servers of App and/or its affiliates. The information and materials may be sent to your country, region or App where the information and data are collected and accessed outside the country. , storage and display.

  1. Use of cookies

a) If you do not refuse to accept cookies, App will set or access cookies on your computer so that you can log in or use the App platform services or features that rely on cookies. App uses cookies to provide you with more Thoughtful personalized service, including promotional services.

b) You have the right to choose to accept or decline to accept cookies. You can refuse to accept cookies by modifying your browser settings. However, if you choose to refuse to accept cookies, you may not be able to log in or use the App web service or feature that relies on cookies.

c) This policy will apply to information obtained through the cookies set by App.

  1. Information security

a) App account has security protection function, please keep your username and password information safely. App will ensure that your information is not lost, misused and altered by security measures such as encrypting user passwords. Despite the aforementioned security measures, please also note that there are no “perfect security measures” on the information network.

b) When using the App web service for online transactions, you will inevitably disclose your personal information, such as contact information or postal address, to the counterparty or potential counterparty. Please protect your personal information and provide it to others only when necessary. If you find that your personal information has been compromised, especially if the App username and password are compromised, please contact App customer service immediately so that App can take appropriate measures.

1.创建本地分支 git checkout -b backup origin/backup

2.保存帐号和密码,下次不需要再次输入 git config --global credential .helper store

3.添加到git本地仓库 文件:git add file 目录:git add document -A

4.提交本地仓库 git commit

5.拉取最新 git pull

6.推送到远程 git push

7.只拉起最新一次提交 git clone --depth=1 https://github.com/xxx/xxx.git