鱼C论坛

 找回密码
 立即注册
查看: 3161|回复: 1

关于vscode运行c++的一个问题

[复制链接]
发表于 2021-1-2 23:29:15 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
请问为什么我按照老乌龟翻译的视频做了,运行了如下程序:
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. void o(int x){
  4.         cout<<x;
  5. }
  6. void t(int x){
  7.         cout<<x*2-1;
  8. }
  9. void s(int x){
  10.         cout<<3*x-11;
  11. }

  12. int main(){
  13.         int x;
  14.         cin>>x;
  15.         if(x<1) o(x);
  16.         if(x>=1&&x<10) t(x);
  17.         if(x>=10) s(x);
  18.        
  19.     return 0;
  20. }
复制代码

结果报了给这样的错:(翻译来自于百度翻译)
error: no iconv implementation, cannot convert from UTF-8 to GBK
错误:没有iconv实现,无法从UTF-8转换为GBK
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2021-1-3 08:51:54 | 显示全部楼层
说不定要把源文件已gbk的编码格式保存
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-5-3 17:37

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表