亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? desc1.cpp

?? 如題 就是 這東西 為什么非要我 說到 20個(gè) 字 呢 看看這回 夠 不
?? CPP
字號(hào):
// Desc1.cpp
//
// Copyright (c) 1999-2007 Symbian Software Ltd.  All rights reserved.
//
// $Change: 937687 $

// This exercise is designed to build familiarity with descriptors.
//
// The exercise consists of three parts. In the first part, the comparison
// is made between the C string and the EPOC descriptors. You are asked to 
// build and run the exercise, and observe the output of the console based
// application.
//
// In the second part of the exercise, you are introduced to a TPtr class.
// You are asked to perform basic string operation using methods available 
// to a TPtr class.
//
// In the third part of the exercises, string manipulation is preformed
// using TBuf and TBufC classes, highlighting the differences between the two.

// PROJECT HEADERS
#include "eustd.h"

// Common literal text
_LIT(KSpace,                "\n");
_LIT(KTxtHelloWorld,        "Hello World");
_LIT(KTxtPressToContinue,   " \nPress Any Key To Continue\n");
_LIT(KPartOne,              "PART ONE\n\n");
_LIT(KPartTwo,              "PART TWO\n");
_LIT(KPartThree,            "PART THREE\n\n");

// Common format strings
_LIT(KPtrLengthSize,        "Ptr()=%x; Length()=%d; Size()=%d\n");
_LIT(KMaxLength,            "MaxLength()=%d\n");
_LIT(KTPtr,                 "\nTPtr:");
_LIT(KTPtrC,                "\nTPtrC:");
_LIT(KTBufC,                "\nTBufC:");
_LIT(KTBuf,                 "\nTBuf:");

// Do the example
LOCAL_C void doExampleL()
    {  
    
    // Beginning of the exercise //

    //////////////////////////////
    //////////PART ONE ///////////
    //////////////////////////////

    console->Printf(KPartOne);

    //TODO
    // Lets start this exercise by comparing the C string with 
    // descriptors. Un-comment the block of code below that
    // compares the C string with the EPOC TBuf descriptor. 
    // NOTE : Size of the C string is 24 bytes to allow for 
    // the terminating NULL. EPOC descriptors don't care about
    // the terminating NULL character. More information on this
    // can be found in the SDK examples.
    // In this example, UNICODE or wide characters
    // are used, which implies that each character occupies 2 bytes.
    
    TText str1[12] =  {'H','e','l','l','o',' ','w', 'o', 'r', 'l', 'd','\0'}; // C style string 

    TPtrC ptrC(str1);   
    TBuf<12> epocString(str1);   
    _LIT(KCTempExample, "C string: %s \n" );  
    console->Printf(KCTempExample, str1);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, str1, ptrC.Length(), sizeof(str1));
    console->Printf(KTBuf);
    console->Printf(epocString);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, epocString.Ptr(), epocString.Length(), epocString.Size()); 
    console->Printf(KMaxLength, epocString.MaxLength());  

    console->Printf(KTxtPressToContinue);
    console->Getch();
    console->ClearScreen();

    //////////////////////////////
    //////////PART TWO ///////////
    //////////////////////////////

    console->Printf(KPartTwo);
    
    // Comments provided below will guide you through this part
    // of the exercise

    TText str[16] =  {'H','e','l','l','o',' ','w', 'o', 'r', 'l', 'd','!','\0'};

    // TPtr descriptor represents the text.
    // Descriptor length is 12 but max length is 13. Since the 
    // descriptor does not need the terminating NULL, in this example,
    // the last data position is spare. 
    // TPtrC descriptor points to the same string. 

    TPtr  tptrDesc(str, 12, 13); 
    TPtrC tptrcDesc(str);
      
    //TODO
    // The Statement below will print out the string using TPtr and TPtrC, 
    // and the information about the pointer value, length and max length.
    // Note that both of these descriptors point to the same data area 
    // (check Ptr() values).
    
    console->Printf(KTPtr);
    console->Printf(tptrDesc);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrDesc.Ptr(), tptrDesc.Length(), tptrDesc.Size()); 
    console->Printf(KMaxLength, tptrDesc.MaxLength());   

    console->Printf(KTPtrC);
    console->Printf(tptrcDesc);   
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrcDesc.Ptr(), tptrcDesc.Length(), tptrcDesc.Size()); 

    //TODO
    // Set the length of the tptrDesc to five and print out the new string
    // with the lenght,size and maxlength information. Check handouts
    // for this section to see what functions are available to you.
    // Print the same string using TPtrC. Compile and run the program. 
    // What do you observe?

    tptrDesc.SetLength(5); 
    console->Printf(KTPtr);
    console->Printf(tptrDesc);  
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrDesc.Ptr(), tptrDesc.Length(), tptrDesc.Size()); 
    console->Printf(KMaxLength, tptrDesc.MaxLength());

    console->Printf(KTPtrC);
    console->Printf(tptrcDesc);   
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrcDesc.Ptr(), tptrcDesc.Length(), tptrcDesc.Size()); 

    console->Printf(KTxtPressToContinue);
    console->Getch();
    console->ClearScreen(); 
    
    //TODO
    // Set the length of the tptrDesc to zero now. Use Zero() function to do that
    // rather than tptrDesc.SetLength(0). Both way would work, however this is
    // just to familiarise yourself with other functions available.. Print string, 
    // pointer, length, size and max length. Compile and run the program.

    tptrDesc.Zero();  
    console->Printf(KTPtr);
    console->Printf(tptrDesc);  
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrDesc.Ptr(), tptrDesc.Length(), tptrDesc.Size()); 
    console->Printf(KMaxLength, tptrDesc.MaxLength());       

    //TODO
    // Un-comment the code below. Compile and run the program.
    // This will cause program to Panic. Using the debugger
    // investigate the cause of this panic and fix the bug in the code 
    // below.
    
    
    tptrDesc.SetLength(13);   
    console->Printf(KTPtr);
    console->Printf(tptrDesc);   
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrDesc.Ptr(), tptrDesc.Length(), tptrDesc.Size()); 
    console->Printf(KMaxLength, tptrDesc.MaxLength());        
 
    console->Printf(KTxtPressToContinue);
    console->Getch();
    console->ClearScreen();  

    //////////////////////////////
    //////////PART THREE /////////
    //////////////////////////////

    console->Printf(KPartThree);

    //TODO
    // This part of the exercise is designed to build familiarity with
    // TBuf and TBufC descriptors. 
    // Have a look at the block of code provided below.
    // Make sure you understand everything before proceeding.
    // Compile and run the program. Observe the output of the application.

    _LIT(KTBufCExample, "I am a long string in TBufC");     
    TBufC<27> bufc(KTBufCExample);
    console->Printf(bufc);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, bufc.Ptr(), bufc.Length(), bufc.Size());
    // console->Printf(KMaxLength, bufc.MaxLength());


    // The code above didn't compile, investigate why ?
    // Fix the bug and recompile and run the program.


    //TODO
    // Un-comment the code below and try to compile and run it.
    // Do you think this will compile the first time and why ?
    
   
    _LIT(KTBufExample, "I am a long string in TBuf");     
    TBuf<26> buf(KTBufExample);
    console->Printf(KSpace);
    console->Printf(buf);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, buf.Ptr(), buf.Length(), buf.Size());
    console->Printf(KMaxLength, buf.MaxLength()); 


    //TODO
    // Create a TPtr to a bufc. Print the string, length and maxlength
    // using TPtr class.

    TPtr tptrToBufC = bufc.Des();
    console->Printf(KSpace);
    console->Printf(tptrToBufC);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrToBufC.Ptr(), tptrToBufC.Length(), tptrToBufC.Size());
    console->Printf(KMaxLength, tptrToBufC.MaxLength());
   
    console->Printf(KTxtPressToContinue);
    console->Getch();
    console->ClearScreen();


    //TODO
    // Delete string "long " from the buffer via TPtr.
    // Use Delete function.

    tptrToBufC.Delete((tptrToBufC.Length() - 21), 5);
     
    //TODO
    // Print the strings using TPtr and TBufC.
    // Observe what is happening with the TBufC.
    
    console->Printf(KTPtr);
    console->Printf(tptrToBufC);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrToBufC.Ptr(), tptrToBufC.Length(), tptrToBufC.Size());
    console->Printf(KMaxLength, tptrToBufC.MaxLength());
    
    console->Printf(KTBufC);
    console->Printf(bufc);
    console->Printf(KPtrLengthSize, bufc.Ptr(), bufc.Length(), bufc.Size());
    //TODO
    // Now lets try the same thing but using TBuf instead of TBufC
    // Un-comment the code below and try to compile it. Will it compile ?
    // Why or why not ? 

/*      
    TPtr tptrToBuf = buf.Des();
    console->Printf(tptrToBuf);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, tptrToBuf.Ptr(), tptrToBuf.Length(), tptrToBuf.Size());
    console->Printf(KMaxLength, tptrToBuf.MaxLength());
*/

    //TODO
    // Modify the TBuf size and print the new status as before

    buf.SetLength(2);
    console->Printf(KTBuf);
    console->Printf(buf);
    console->Printf(KSpace);
    console->Printf(KPtrLengthSize, buf.Ptr(), buf.Length(), buf.Size());
    console->Printf(KMaxLength, buf.MaxLength());   
    } // end doExampleL

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费资源在线播放| 99精品视频中文字幕| 久久久久久99久久久精品网站| 丁香激情综合国产| 亚洲第一狼人社区| 久久先锋影音av鲁色资源网| 91丝袜呻吟高潮美腿白嫩在线观看| 肉丝袜脚交视频一区二区| 国产午夜亚洲精品午夜鲁丝片| 在线免费亚洲电影| 国产精品99久| 七七婷婷婷婷精品国产| 一卡二卡欧美日韩| 亚洲国产精品成人久久综合一区| 欧美一区二区在线看| 在线欧美日韩精品| av激情亚洲男人天堂| 国产又黄又大久久| 日韩成人dvd| 视频一区视频二区在线观看| 亚洲日本青草视频在线怡红院 | 激情文学综合网| 亚洲不卡在线观看| 亚洲男人电影天堂| 最新久久zyz资源站| 久久久久高清精品| 日韩精品在线看片z| 7777精品久久久大香线蕉| 91麻豆国产香蕉久久精品| 成人免费毛片app| 国产a久久麻豆| 日韩高清一区在线| 国产综合色精品一区二区三区| 日韩中文字幕区一区有砖一区| 欧美日韩国产不卡| av亚洲精华国产精华精| 国内精品在线播放| 麻豆成人久久精品二区三区红 | 自拍偷在线精品自拍偷无码专区| 久久久久久一级片| 欧美一级二级三级蜜桃| 在线观看网站黄不卡| 日本伦理一区二区| 91亚洲精品久久久蜜桃网站| jlzzjlzz亚洲女人18| 国产一区 二区| 风间由美一区二区av101 | 日日摸夜夜添夜夜添亚洲女人| 中文字幕佐山爱一区二区免费| 久久免费美女视频| 国产精品无人区| 国产欧美一区二区精品忘忧草 | 日本午夜精品一区二区三区电影| 一区二区三区.www| 成年人午夜久久久| 国产高清不卡二三区| 在线播放一区二区三区| 欧美xxx久久| 亚洲综合一区二区| 国产精品伊人色| 欧美国产精品一区二区| 国产一区二区三区综合| 久久久国产一区二区三区四区小说| 亚洲综合免费观看高清完整版 | 国产精品理论在线观看| 在线精品视频免费播放| 国产精品久久久久久久久久久免费看| 欧美日韩视频第一区| 国产在线视频一区二区| 亚洲综合激情网| 欧美绝品在线观看成人午夜影视| 三级在线观看一区二区| 日韩欧美你懂的| 成人午夜视频在线| 亚洲一区二区三区四区五区黄| 中文字幕免费观看一区| 欧美综合欧美视频| 懂色av一区二区三区蜜臀| 精品国产免费一区二区三区香蕉 | 国产传媒日韩欧美成人| 日韩亚洲欧美在线观看| 成人激情图片网| 成人小视频免费在线观看| 国产a视频精品免费观看| 亚洲男人电影天堂| 亚洲激情成人在线| 国产精品久久国产精麻豆99网站| 中文字幕欧美国产| 337p日本欧洲亚洲大胆色噜噜| 国产精品第一页第二页第三页| 欧美精品一区二区三区蜜桃视频| 亚洲欧美日韩国产综合| 粉嫩高潮美女一区二区三区| 精品久久国产字幕高潮| 26uuu欧美| 国产精品久久久久久久久快鸭 | 亚洲国产aⅴ成人精品无吗| 麻豆久久久久久久| 国产成人丝袜美腿| 欧美另类高清zo欧美| 精品国产91洋老外米糕| 亚洲免费观看高清完整版在线观看 | 欧美精品自拍偷拍动漫精品| 国产精品久久久一本精品| 不卡av免费在线观看| 国精产品一区一区三区mba视频| 色综合欧美在线| 51午夜精品国产| 1000精品久久久久久久久| 日本不卡高清视频| 在线日韩一区二区| 欧美乱妇一区二区三区不卡视频| 成av人片一区二区| 欧美狂野另类xxxxoooo| 国产清纯白嫩初高生在线观看91 | 国产一区二区在线电影| 色老汉av一区二区三区| 欧美国产亚洲另类动漫| 日本sm残虐另类| 色综合咪咪久久| 日本一二三不卡| 亚洲成人7777| 色久综合一二码| 国产色一区二区| 激情亚洲综合在线| 7777精品伊人久久久大香线蕉完整版 | 日韩中文字幕麻豆| www.亚洲人| 亚洲国产一区二区视频| 亚洲精品成人天堂一二三| 亚洲一级电影视频| 大桥未久av一区二区三区中文| 欧美精品乱码久久久久久| 久久久久久**毛片大全| 青青草精品视频| 欧美主播一区二区三区| 国产欧美日韩在线| 国产在线观看一区二区| 欧美一区二区三级| 亚洲精品免费在线观看| 丰满白嫩尤物一区二区| 欧美乱熟臀69xxxxxx| 日韩成人午夜电影| 欧美系列在线观看| 亚洲一区二区三区四区五区黄 | 蜜桃精品视频在线| 制服丝袜亚洲播放| 亚洲在线观看免费| 欧美日韩日本视频| 亚洲一级片在线观看| 欧美人妇做爰xxxⅹ性高电影| 亚洲精品免费视频| 国产综合久久久久久鬼色 | 国产精品三级av| 成av人片一区二区| 美女诱惑一区二区| 亚洲一区二区综合| 日韩不卡在线观看日韩不卡视频| 制服丝袜在线91| 亚洲国产精品久久不卡毛片| 欧美精品自拍偷拍动漫精品| 性欧美大战久久久久久久久| 欧美亚洲一区二区在线| 亚洲午夜一区二区| 本田岬高潮一区二区三区| 亚洲精品日韩专区silk| 一本一道综合狠狠老| 日本不卡一区二区三区 | 大胆亚洲人体视频| 中文字幕一区二区三中文字幕| 不卡一区二区三区四区| 亚洲制服丝袜av| 欧美一区二区免费观在线| 国产精品亚洲а∨天堂免在线| 欧美国产禁国产网站cc| 欧美伊人久久大香线蕉综合69| 日韩av电影天堂| 在线一区二区视频| 久久99国产精品久久99| 久久综合视频网| 色婷婷亚洲婷婷| 亚洲精品乱码久久久久| 欧美一区二区三区免费视频 | 99久久er热在这里只有精品66| 亚洲三级在线播放| 日韩午夜在线观看| 国产成人午夜高潮毛片| 午夜久久久久久电影| 精品美女在线播放| 92精品国产成人观看免费| 五月婷婷久久综合| 国产精品国产自产拍在线| 欧美最新大片在线看| 国产精品自拍网站| 亚洲欧美激情视频在线观看一区二区三区| 91精品久久久久久久91蜜桃| 国产激情一区二区三区| 亚洲成人精品一区| 久久免费偷拍视频| 91精品国产91久久久久久最新毛片|