pex2_9.cpp
来自「数据结构C++代码,经典代码,受益多多,希望大家多多支持」· C++ 代码 · 共 19 行
CPP
19 行
#include <iostream.h>
#include <string.h>
void main(void)
{
// str points to a string literal
char *str= "abcdefg";
int x[4] = {0,1,2,3}, i=0;
// cannot append to a string literal. only
// 8 chars are actually allocated
strcat(str,".1234567");
// replace entries of x until a 4 is found.
// however, there is no 4!
while(x[i] != 4)
x[i++] = 99;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?