#include "stdafx.h"
#include
#include
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char *s = "Hello";
char *t = "World";
int i = strcmp(s, t);
if (i > 0)
cout << "s>t" << endl;
else if (i < 0)
cout << "s<t" << endl;
else
cout << "s=t" << endl;
int j = strlen(s);
cout << endl;
cout << "字符串s的长度为:" << j << endl;
return 0;
}
Error 2 error C2001: newline in constant 22 1
Error 3 error C2143: syntax error : missing ';' before 'return' 23 1
Warning 1 warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
求高手改错,不胜感激!
c++问题 指向字符串的指针
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
5条回答
悬赏问题
- ¥30 求一段fortran代码用IVF编译运行的结果
- ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
- ¥15 lammps拉伸应力应变曲线分析
- ¥15 C++ 头文件/宏冲突问题解决
- ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
- ¥50 安卓adb backup备份子用户应用数据失败
- ¥20 有人能用聚类分析帮我分析一下文本内容嘛
- ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
- ¥30 python代码,帮调试,帮帮忙吧
- ¥15 #MATLAB仿真#车辆换道路径规划