当前位置:网站首页>[isprint function determines whether characters can be output]
[isprint function determines whether characters can be output]
2022-07-23 21:33:00 【Li is struggling】
【isprint() Function to determine whether a character is printable .' ' Space 】
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
string s = "12d1 2 ddsd";
int d = 0;
for (int i = 0; i<s.length(); i++)
{
if (s[i] != ' ' && isprint(s[i])) // Judge not to be a space And can output ;
{
s[d++] = s[i];
}
}
cout << " The changed string is :" << endl;
for (int i = 0; i < d; i++)
{
cout << s[i];
}
}

边栏推荐
- Unity solves that animation is not available: the animationclip 'xxx' used by the animation component 'xxx' must be marked as legacy
- 2022-7-23 12点 程序爱生活 小时线顶背离出现,保持下跌趋势,等待反弹信号出现。
- h264编码参数
- Chapter1 数据清洗
- 【持续更新】树莓派启动与故障系列集锦
- 现在完全不知道怎么同步
- Problems and abuse of protocol buffers
- Connect with Hunan Ca and use U_ Key login
- Be a professional software craftsman
- (note) learning rate setting of optimizer Adam
猜你喜欢

scala编程(中级进阶实验应用)

Cluster chat server: Design of database table

深入浅出边缘云 | 1. 概述

Opencv image processing Laplace pyramid

Stm32c8t6 driving lidar actual combat (II)

Hezhou esp32c3 hardware configuration information serial port printout

The third slam Technology Forum - Professor wuyihong

Modular development

LeetCode_ 376_ Wobble sequence

Kuberntes cloud native combat VI uses rook to build CEPH cluster
随机推荐
数据库压力测试方法小结
比较关注证券公司究竟哪个佣金最低?请问网上开户安全么?
1062 Talent and Virtue
High numbers | calculation of triple integral 2 | high numbers | handwritten notes
TCP半连接队列和全连接队列(史上最全)
【持续更新】树莓派启动与故障系列集锦
Green-Tao 定理的证明 (2): Von Neumann 定理的推广
1061 Dating
Scala programming (elementary)
集群聊天服务器:数据库表的设计
OpenCV图像处理——拉普拉斯金字塔
Customer exit variable in query
剑指Offer第二版:字符串(简单)
First acquaintance with JS (programming suitable for beginners)
&9 nodemon自动重启工具
宇树A1机器狗手势控制
Kuberntes cloud native combat VI uses rook to build CEPH cluster
2022.7.22 JS object
Qt桌面白板工具其一(解决曲线不平滑的问题——贝塞尔曲线)
[arXiv] notes on uploading papers for the first time