Removes an element or a range of elements in a list from specified positions.錛堜粠鎸囧畾鐨勪綅緗紝縐婚櫎list涓竴涓厓绱狅紝鎴栬呮槸縐婚櫎涓鍧楀尯鍩熺殑鍏冪礌錛?/p>
锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
榪樺ソ鎵懼埌浜嗚В鍐蟲柟妗堬紝璁板綍涓嬫潵~~~~
http://www.qtcn.org/bbs/home.php QT涓枃璁哄潧錛岀増涓誨簲璇ュ緢寮哄ぇ~~鎬葷粨浜嗗緢澶氱増鏈殑緙栬瘧鏂規~
鍙槸鎴戜笅杞界殑4.4.3鐨勶紝緇撴灉娌℃湁鐪嬪埌銆傛渶鍚庡湪緗戜笂鍙戠幇浜嗕竴鏂囷紒
http://blog.csdn.net/huybin_wang/archive/2008/10/17/3091377.aspx錛岃窡鐫浠栫殑璧幫紝鍑犱箮鎴愬姛錛屽敮涓鐨勫氨鏄暡鍛戒護鐨勬椂鍊欎笉鏄敤鐨剆tart-->cmd錛岃屾槸vs2003閲岄潰鐨勫懡浠ゆ彁紺恒?br>
鏂囩珷杞澆濡備笅錛?br>
涓. 瀹夎鍑嗗:
1. 鍑嗗瀹夎鏂囦歡:
(1):Qt 4.4.3 OpenSource for Windows
涓嬭澆鍦板潃: ftp://ftp.trolltech.no/qt/source/qt-win-opensource-src-4.4.3.zip
(2)Qt Visual Studio Integration v1.2.2 for.VS.2003.2005 鑻辨枃鐗?/span>
涓嬭澆鍦板潃:http://www.fixdown.com/china/Programming/2525.htm
(3)Visual Assist (浠g爜鎻愮ず鍔熻兘,閫夎)
2. 宸插畨瑁匳S2005,瀹夎鍏朵腑C++鍗沖彲.
3. 灝嗕笅杞界殑Qt 4.4.3鏂囦歡瑙e帇. 濡傝В鍘嬭嚦鐩綍D:\QT\4.4.3
4. 璁劇疆鐜鍙橀噺
鍙沖嚮鎴戠殑鐢佃剳->灞炴?>楂樼駭->鐜鍙橀噺;
鍦ㄧ郴緇熷彉閲忎腑鏂板緩QTDIR鍙橀噺,鍙橀噺鍊糄:\QT\4.4.3
鏂板緩QMAKESPEC鍙橀噺,鍙橀噺鍊紈in32-msvc2005
鍦≒ATH鍙橀噺涓~鍔?D:\QT\4.4.3\bin;
PS:
==============================
value platform
win32-msvc VC6
win32-msvc2003 VS2003
win32-msvc2005 VS2005
win32-msvc2008 VS2008
==============================
鑷蟲鍑嗗宸ヤ綔緇撴潫.
浜? 緙栬瘧QT
1. 閰嶇疆
鍦ㄥ懡浠よ鎻愮ず絎︿笅榪涘叆QTDIR鐩綍,濡俢d D:\QT\4.4.3
鍦ㄥ懡浠よ涓緭鍏onfigure -no-dsp -vcproj
(鍏蜂綋鍙傛暟璁劇疆鍙緭鍏onfigure /?鏌ョ湅)
configure 澶х害闇鍑犲垎閽熸椂闂?
2. 緙栬瘧
configure瀹屾垚鍚?浼氭湁鎻愮ず.姝ゆ椂鍙渶杈撳叆nmake榪涜緙栬瘧.緙栬瘧鎵鑺辨椂闂磋緝闀?涓や笁涓皬鏃?瑙嗘満鍣ㄦц兘鑰屽畾).
涓? 瀹夎Qt Visual Studio Integration v1.2.2
鐩存帴瀹夎鍗沖彲,鐢ㄦ埛鍚嶄換鎰?娉ㄥ唽鐮佸彲鍙栦笅鍒楀間箣涓:
FG6ALD-Y2PYGSX-F4M-LQAHD59-JZ6QKN-FJ7PXV-049B
FGEZDGX-AZPBJ8X-F4M-K44SA7M-UEG7TH-UYAML8M-05D7
FGPDXA9-MXKFJYM-F4M-BHEDKZX-8XCETXX-92WFVWX-A05E
FGWNPUX-Y6X26L9-F4M-GLZMY99-97RXPJX-BP256DX-737C
鍥? 閰嶇疆VS2005
"宸ュ叿"->"閫夐」"->"QT"->"Builds"娣誨姞version name: 4.4.3 PATH: D:\QT\4.4.3
鑻ュ畨瑁呬簡Visual Assist,鍒欓渶閫夋嫨"VAssistX" -> "Visual Assist X Options ..." -> "Projects", 鍦?Platform"閲岄潰鎶?Win32"鏀逛負"Custom",
鍦?Stable include files"涓坊鍔燚:\Qt\4.3.3\include鐩綍涓嬬殑瀛愭枃浠跺す.
灝咲:\QT\4.4.3\bin鐩綍涓嬬殑DLL鏂囦歡鎷峰埌C:\windows鐩綍涓?娉ㄦ剰,閲嶈QT鏃惰寰楀垹闄ゆ垨鏇挎崲.鍚﹀垯鍙兘浼氬嚭鐜版壘涓嶅埌閾炬帴鍏ュ彛鐨勯敊璇?)
鑷蟲瀹夎緇撴潫.
浜? 嫻嬭瘯
VS2005涓?"鏂囦歡"->"鏂板緩"->"欏圭洰",閫夋嫨"Qt Projects"->"Qt Application".杈撳叆鍚嶇О.紜畾,FINISH,OK
鍙屽嚮瑙e喅鏂規涓?hello.ui",鍗沖彲寮瑰嚭紿椾綋緙栬緫鍣?鍦ㄧ獥浣撲笂鍔犲叆涓涓猈IDGET,濡侭UTTON.
緙栬瘧榪愯鍗沖彲.
#ifndef _SINGLETON_H__
#define _SINGLETON_H__
#include <assert.h>
#include <iostream>
using namespace std;
#if VW3D_COMPILER == COMPILER_MSVC
// Turn off warnings generated by this singleton implementation
# pragma warning (disable : 4311)
# pragma warning (disable : 4312)
#endif


/**//** Template class for creating single-instance global classes.
*/
template <typename T> class Singleton

{
protected:
static T* ms_Singleton;
public:
Singleton( void )
{
cout << "Sungleton Create~" << endl;
assert( !ms_Singleton );
ms_Singleton = static_cast< T* >( this );
}
~Singleton( void )
{
cout << "Sungleton DeCreate~" << endl;
assert( ms_Singleton ); ms_Singleton = 0;
}
static T& getSingleton( void )
{ assert( ms_Singleton ); return ( *ms_Singleton ); }
static T* getSingletonPtr( void )
{ return ( ms_Singleton ); }
};
#endif
#pragma once
#include "1.h"
#include <iostream>
using namespace std;
class CA : public Singleton<CA>

{
public:
CA(void);
~CA(void);
void print(int i)
{
cout << i << endl;
}
};

#include ".\a.h"
CA * Singleton<CA>::ms_Singleton = NULL;
CA::CA(void)

{
cout << "Cr CA" << endl;
}
CA::~CA(void)

{
cout << "~~CA" << endl;
}
#include <Windows.h>
#include <iostream>
#include <tchar.h>
#include <assert.h>
#include "A.h"
int main()
{
// CA ca;
CA::getSingletonPtr()->print(100);
getchar();
return 0;
}#include <time.h>
#include <stdio.h>
int main( void )
{
time_t t = time( 0 );
char tmp[64];
strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A 鏈勾絎?j澶?%z",
localtime(&t) );
puts( tmp );
return 0;
}
//鏂規浜?浼樼偣錛氳兘綺劇‘鍒版縐掔駭錛涚己鐐癸細浣跨敤浜唚indows API
#include <windows.h>
#include <stdio.h>
int main( void )
{
SYSTEMTIME sys;
GetLocalTime( &sys );
printf( "%4d/%02d/%02d %02d:%02d:%02d.%03d 鏄熸湡%1d\n"
,sys.wYear,sys.wMonth,sys.wDay
,sys.wHour,sys.wMinute,sys.wSecond,sys.wMilliseconds
,sys.wDayOfWeek);
return 0;
}
//鏂規涓?浼樼偣錛氬埄鐢ㄧ郴緇熷嚱鏁?br>#include<stdlib.h>
#include<iostream>
using namespace std;
void main(){
system("time");
}
鍙互鏀瑰彉鐢佃剳鐨勬椂闂磋瀹?
鏂規4錛?br>#include<iostream>
#include<ctime>
using namespace std;
int main(){
time_t now_time;
now_time = time(NULL);
cout<<now_time;
return 0;
}
灝嗗綋鍓嶆椂闂存姌綆椾負縐掔駭錛屽啀閫氳繃鐩稿簲鐨勬椂闂存崲綆楀嵆鍙?br>
鏂規5
//////////////////////////////////////////////////////////////////////////////////////////////
void main() {
LARGE_INTEGER lv;
// 鑾峰彇姣忕澶氬皯CPU Performance Tick
QueryPerformanceFrequency( &lv );
// 杞崲涓烘瘡涓猅ick澶氬皯縐?br> double secondsPerTick = 1.0 / lv.QuadPart;
for ( size_t i = 0; i < 100; ++i ) {
// 鑾峰彇CPU榪愯鍒扮幇鍦ㄧ殑Tick鏁?br> QueryPerformanceCounter( &lv );
// 璁$畻CPU榪愯鍒扮幇鍦ㄧ殑鏃墮棿
// 姣擥etTickCount鍜宼imeGetTime鏇村姞綺劇‘
double timeElapsedTotal = secondsPerTick * lv.QuadPart;
cout.precision( 6 );
cout << fixed << showpoint << timeElapsedTotal << endl;
//printf( "%lf \n", timeElapsedTotal ) ;
}
}
#include <iostream>
#include <list>
#include <vector>
using namespace std;
#pragma pack(push, 1)
struct Node
{
int a;
char b;
double c;
char d[10];
};
#pragma pack(pop)

list<Node> lstNode;
vector<Node> vecNode;
Node node[20];
int a;
int main()
{
cout << sizeof(a) << endl;
cout << " sizeof(Node) : " << sizeof(Node) << " sizeof(node) : " << sizeof(node) << endl;
for (int i = 0; i < 20; i++)
{
node[i].a = i;
node[i].b = 'a';
node[i].c = 123.321;
strcpy(node[i].d,"123");
lstNode.push_back(node[i]);
vecNode.push_back(node[i]);
}
cout << " sizeof(node) " << sizeof(node) << endl;
cout << " sizeof(list) " << sizeof(list<Node>) << endl ;
cout << " sizeof(lstNode) " << sizeof(lstNode) << " lstNode.size() " << lstNode.size() << endl;
cout << " sizeof(vector) " << sizeof(vector<Node>) << endl;
cout << " sizeof(vecNode) " << sizeof(vecNode) << " vecNode.size() " << vecNode.size() << endl;
return 0;
}
鍦ㄦ垜浠啓鐨勭▼搴忓綋涓?鎬繪湁涓浜涢厤緗俊鎭渶瑕佷繚瀛樹笅鏉?浠ヤ究瀹屾垚紼嬪簭鐨勫姛鑳?鏈綆鍗曠殑鍔炴硶灝辨槸灝嗚繖浜涗俊鎭啓鍏NI鏂囦歡涓?紼嬪簭鍒濆鍖栨椂鍐嶈鍏?鍏蜂綋搴旂敤濡備笅:
銆銆涓.灝嗕俊鎭啓鍏?INI鏂囦歡涓?
銆銆1.鎵鐢ㄧ殑WINAPI鍑芥暟鍘熷瀷涓?
BOOL WritePrivateProfileString( LPCTSTR lpAppName, LPCTSTR lpKeyName, LPCTSTR lpString, LPCTSTR lpFileName );
銆銆鍏朵腑鍚勫弬鏁扮殑鎰忎箟:
銆銆銆LPCTSTR lpAppName 鏄疘NI鏂囦歡涓殑涓涓瓧孌靛悕.
銆銆銆LPCTSTR lpKeyName 鏄痩pAppName涓嬬殑涓涓敭鍚?閫氫織璁插氨鏄彉閲忓悕.
銆銆銆LPCTSTR lpString 鏄敭鍊?涔熷氨鏄彉閲忕殑鍊?涓嶈繃蹇呴』涓篖PCTSTR鍨嬫垨CString鍨嬬殑.
銆銆銆LPCTSTR lpFileName 鏄畬鏁寸殑INI鏂囦歡鍚?
銆銆2.鍏蜂綋浣跨敤鏂規硶:璁劇幇鏈変竴鍚嶅鐢?闇鎶婁粬鐨勫鍚嶅拰騫撮緞鍐欏叆 c:\stud\student.ini 鏂囦歡涓?
CString strName,strTemp;
int nAge;
strName="寮犱笁";
nAge=12;
::WritePrivateProfileString("StudentInfo","Name",strName,
"c:\\stud\\student.ini");
銆銆姝ゆ椂c:\stud\student.ini鏂囦歡涓殑鍐呭濡備笅:
銆銆銆[StudentInfo]
銆銆銆
銆銆3.瑕佸皢瀛︾敓鐨勫勾榫勪繚瀛樹笅鏉?鍙渶灝嗘暣鍨嬬殑鍊煎彉涓哄瓧絎﹀瀷鍗沖彲:
strTemp.Format("%d",nAge);
::WritePrivateProfileString("StudentInfo","Age",strTemp,
"c:\\stud\\student.ini");
浜?灝嗕俊鎭粠INI鏂囦歡涓鍏ョ▼搴忎腑鐨勫彉閲?
銆銆1.鎵鐢ㄧ殑WINAPI鍑芥暟鍘熷瀷涓?
DWORD GetPrivateProfileString(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
LPCTSTR lpDefault,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
);
銆銆鍏朵腑鍚勫弬鏁扮殑鎰忎箟:
銆銆銆鍓嶄簩涓弬鏁頒笌 WritePrivateProfileString涓殑鎰忎箟涓鏍?
銆銆銆lpDefault : 濡傛灉INI鏂囦歡涓病鏈夊墠涓や釜鍙傛暟鎸囧畾鐨勫瓧孌靛悕鎴栭敭鍚?鍒欏皢姝ゅ艱祴緇欏彉閲?
銆銆銆lpReturnedString : 鎺ユ敹INI鏂囦歡涓殑鍊肩殑CString瀵硅薄,鍗崇洰鐨勭紦瀛樺櫒.
銆銆銆nSize : 鐩殑緙撳瓨鍣ㄧ殑澶у皬.
銆銆銆lpFileName : 鏄畬鏁寸殑INI鏂囦歡鍚?
銆銆2.鍏蜂綋浣跨敤鏂規硶:鐜拌灝嗕笂涓姝ヤ腑鍐欏叆鐨勫鐢熺殑淇℃伅璇誨叆紼嬪簭涓?
CString strStudName;
int nStudAge;
GetPrivateProfileString("StudentInfo","Name","榛樿濮撳悕",
strStudName.GetBuffer(MAX_PATH),MAX_PATH,"c:\\stud\\student.ini");
銆銆鎵ц鍚?strStudName 鐨勫間負:”寮犱笁”,鑻ュ墠涓や釜鍙傛暟鏈夎,鍏跺間負:”榛樿濮撳悕”.
銆銆3.璇誨叆鏁村瀷鍊艱鐢ㄥ彟涓涓猈INAPI鍑芥暟:
UINT GetPrivateProfileInt(
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
INT nDefault,
LPCTSTR lpFileName
);
銆銆榪欓噷鐨勫弬鏁版剰涔変笌涓婄浉鍚?浣跨敤鏂規硶濡備笅:
nStudAge=GetPrivateProfileInt("StudentInfo","Age",10,
"c:\\stud\\student.ini");
涓?寰幆鍐欏叆澶氫釜鍊?璁劇幇鏈変竴紼嬪簭,瑕佸皢鏈榪戜嬌鐢ㄧ殑鍑犱釜鏂囦歡鍚嶄繚瀛樹笅鏉?鍏蜂綋紼嬪簭濡備笅:
銆銆1.鍐欏叆:
CString strTemp,strTempA;
int i;
int nCount=6;
file://鍏辨湁6涓枃浠跺悕闇瑕佷繚瀛?
for(i=0;i {strTemp.Format("%d",i);
strTempA=鏂囦歡鍚?
file://鏂囦歡鍚嶅彲浠ヤ粠鏁扮粍,鍒楄〃妗嗙瓑澶勫彇寰?
::WritePrivateProfileString("UseFileName","FileName"+strTemp,strTempA,
"c:\\usefile\\usefile.ini");
}
strTemp.Format("%d",nCount);
::WritePrivateProfileString("FileCount","Count",strTemp,
"c:\\usefile\\usefile.ini");
file://灝嗘枃浠舵繪暟鍐欏叆,浠ヤ究璇誨嚭.
銆銆2.璇誨嚭:
nCount=::GetPrivateProfileInt("FileCount","Count",0,
"c:\\usefile\\usefile.ini");
for(i=0;i {strTemp.Format("%d",i);
strTemp="FileName"+strTemp;
::GetPrivateProfileString("CurrentIni",strTemp,
"default.fil", strTempA.GetBuffer(MAX_PATH),MAX_PATH,
"c:\\usefile\\usefile.ini");
file://浣跨敤strTempA涓殑鍐呭.
}
銆銆琛ュ厖鍥涚偣:
銆銆銆1.INI鏂囦歡鐨勮礬寰勫繀欏誨畬鏁?鏂囦歡鍚嶅墠闈㈢殑鍚勭駭鐩綍蹇呴』瀛樺湪,鍚﹀垯鍐欏叆涓嶆垚鍔?璇ュ嚱鏁拌繑鍥?FALSE 鍊?
銆銆銆2.鏂囦歡鍚嶇殑璺緞涓繀欏諱負 \\ ,鍥犱負鍦╒C++涓? \\ 鎵嶈〃紺轟竴涓?\ .
銆銆銆3.涔熷彲灝咺NI鏂囦歡鏀懼湪紼嬪簭鎵鍦ㄧ洰褰?姝ゆ椂 lpFileName 鍙傛暟涓? “.\\student.ini”.
蹇熼摼鎺?http://www.vsing.cn/go/6142.html
Removes an element or a range of elements in a list from specified positions.錛堜粠鎸囧畾鐨勪綅緗紝縐婚櫎list涓竴涓厓绱狅紝鎴栬呮槸縐婚櫎涓鍧楀尯鍩熺殑鍏冪礌錛?/p>
Return Value錛?br> A bidirectional iterator that designates the first element remaining beyond any elements removed, or a pointer to the end of the list if no such element exists.
鎴戠殑鐞嗚В鏄細涓涓弻鍚戠殑榪唬鍣ㄦ寚鍚戠Щ闄ゅ厓绱犳垨鍏冪礌鍧楃殑 涓嬩竴涓瓨鍦ㄥ湪鍏冪礌銆俹r 褰撳湪璇ist 涓病鏈夋壘鍒拌鍒犻櫎鐨勫厓绱狅紝閭d箞灝嗘寚鍚?end.
濡傛灉鎴戞兂鍦ㄤ竴涓猯ist涓繚瀛?1---10錛岀劧鍚庢煡鎵懼茍涓?鍒犻櫎5 鐨勪唬鐮?搴旇鏄?br>
#include <iostream>
#include <list>
using namespace std;
list<int> lst;
int main()
{
for (int i = 0; i < 10; i++)
{
lst.push_back(10-i);
}
list<int>::iterator it = lst.begin();
for (; it != lst.end();)
{
if((*it) == 5)
{
cout << "Find It" << endl;
cout << (*it) << endl;
lst.erase(it);
cout << (*it) << endl;//榪欎笉鏄垜鎯寵鐨? 鑰屾槸涓涓殢鏈烘暟瀛?br>
break;
}
else
{
it++;
}
}
it = lst.begin();
lst.erase(it);
cout << (*it) << endl;//榪欏鍚屾牱鐨勯棶棰?nbsp;
for (it = lst.begin(); it != lst.end(); it++)
{
cout << (*it) << endl;
}
return 0;
}
#include <iostream>
#include <list>
#include <vector>
using namespace std;
list<int> lst;
vector<int> vec;
int main()
{
for (int i = 0; i < 10; i++)
{
lst.push_back(10-i);
vec.push_back(i);
}
list<int>::iterator it = lst.begin();
for (; it != lst.end();)
{
if((*it) == 5)
{
cout << "Find It" << endl;
cout << (*it) << endl;
it = lst.erase(it);//娉ㄦ剰瑕佹帴鍙楄繑鍥炵殑鍊?br>
cout << (*it) << endl;
break;
}
else
{
it++;
}
}
vector<int>::iterator it2 = vec.begin();
for (; it2 != vec.end(); it2++)
{
if((*it2) == 5)
{
cout << "Find it in vector" << endl;
cout << *it2 << endl;
it2 = vec.erase(it2);//娉ㄦ剰瑕佹帴鍙楄繑鍥炵殑鍊?br>
cout << *it2 << endl;
}
}
it = lst.begin();
it = lst.erase(it); //娉ㄦ剰瑕佹帴鍙楄繑鍥炵殑鍊?br>
cout << (*it) << endl;
for (it = lst.begin(); it != lst.end(); it++)
{
cout << (*it) << endl;
}
return 0;
}
//鏂規硶涓錛氱洿鎺ュ寰呮湰棰?br> 2
#include <stdio.h>
#define PI 3.1415
void main()
{
float r = 0.0;
float h = 0.0;
float l = 0, s = 0, s2 = 0,v = 0,v2 = 0;
printf("Please input r and h :\n");
scanf("%f %f",&r,&h);
l = 2 * PI * r;
s = PI * r * r;
s2 = s * 2 + l * h;
v = (4.0/3.0) * r * r * r * PI;
v2 = s * h;
printf("鍥殑鍛ㄩ暱涓猴細%f\n",l);
printf("鍥殑闈㈢Н涓猴細%f\n",s);
printf("鍦嗘煴鐨勯潰縐負錛?f\n",s2);
printf("鍥悆浣撶Н涓猴細%f\n",v);
printf("鍥煴鐨勪綋縐負錛?f\n",v2);
}
//鍑芥暟璋冪敤錛?br> 2
#include <stdio.h>
#define PI 3.1415
void main()
{
float GetL(float r);
float GetS(float r);
float GetS2(float r, float h);
float GetV(float r, float h);
float GetV2(float r, float h);
float r = 0.0;
float h = 0.0;
float l = 0, s = 0, s2 = 0,v = 0,v2 = 0;
printf("Please input r and h :\n");
scanf("%f %f",&r,&h);
l = GetL(r);
s = GetS(r);
s2 = GetS2(r,h);
v = GetV(r,h);
v2 = GetV2(r,h);
printf("鍥殑鍛ㄩ暱涓猴細%f\n",l);
printf("鍥殑闈㈢Н涓猴細%f\n",s);
printf("鍦嗘煴鐨勯潰縐負錛?f\n",s2);
printf("鍥悆浣撶Н涓猴細%f\n",v);
printf("鍥煴鐨勪綋縐負錛?f\n",v2);
}
float GetL(float r)
{
return (float)(2 * PI * r);
}
float GetS(float r)
{
return (float)PI * r * r;
}
float GetS2(float r, float h)
{
return (float)(GetS(r) * 2 + GetL(r) * h);
}
float GetV(float r, float h)
{
return (float)((4.0/3.0) * r * r * r * PI);
}
float GetV2(float r, float h)
{
return (float)(GetS(r) * h);
}
#include <stdio.h>
void main()
{
float F = 0.0;
float C = 0.0;
printf("璇瘋緭鍏ュ崕姘忔俯搴?\n");
scanf("%f",&F);
C = (float)(5.0/9.0)*(F - 32);
printf("鎽勬皬娓╁害涓猴細%.2f\n",C);
}
//鏂規硶涓錛氶傜敤浜庣敤鎴風殑鐩存帴杈撳叆鐨勫瓧絎︿覆鏉ヨ瘧鐮侊紒
#include <stdio.h>
void main()
{
char strArray[] = "China";
char c = ' ';
int i = 0;
while((c = strArray[i]) != 0)
{
if(c == 'w')
{
c = 'a';
}
else if(c == 'x')
{
c = 'b';
}
else if(c == 'y')
{
c = 'c';
}
else if(c == 'z')
{
c = 'd';
}
else if(c == 'W')
{
c = 'A';
}
else if(c == 'X')
{
c = 'B';
}
else if(c == 'Y')
{
c = 'C';
}
else if(c == 'Z')
{
c = 'D';
}
else
{
c += 4;
}
printf("%c",c);
i++;
}
printf("\n");
}
//鏂規硶浜岋細瀵逛簬鏈姣旇緝鐩存帴:
#include <stdio.h>
void main()
{
char c1 = 'C', c2 = 'h', c3 = 'i', c4 = 'n', c5 = 'a';
c1 += 4;
c2 += 4;
c3 += 4;
c4 += 4;
c5 += 4;
printf("%c%c%c%c%c\n",c1,c2,c3,c4,c5);
}
#include <iostream>
using namespace std;
int main()
{
char strArray[5] = "";
cout << "璇瘋緭鍏ヤ竴涓瓧絎︿覆錛堜笉瑕佽秴榪?涓級:" << endl;
gets(strArray);
puts(strArray);
return 0;
}