唯一的字符代码在 Linux 中运行时不起作用,但在 Windows (C++) 中很好
Unique character code not working when ran in linux but fine in windows (C++)
当我在窗口中运行代码时,它按预期工作。 但是当我在 Linux 中运行它时,程序没有按预期运行并产生完全不同的输出。
我假设这是all_unique_letters方法中的一个问题,但我似乎无法弄清楚。
在bool all_unique_letters(const string &s)
中,unsigned int v;
在没有初始化的情况下使用。如果它包含其他0
的东西,该函数将一个字母报告为重复的,而它不是。
相关文章:
- c++17文件系统::recursive_directory迭代器()在mac上没有给出这样的目录,但在windows上
- 分段 Linux Ubuntu 中的 g++ 错误,但在 Windows 中的 g++/MingW 中,在 C++ 中打
- QDialog 不能在 Windows 上退出,但在 MacOS 上不能退出/
- Makefile在Linux中工作,但在Windows下不起作用,在子目录中找不到文件
- C++代码在 Linux 上按预期工作,但在 Windows 上则不然
- 简单的文本文件格式化在linux下崩溃,但在Windows中很好
- cmake cuda在Windows上单独的编译静态LIB链接错误,但在Ubuntu上没有
- strcpy 在 Windows 上编译,但在 Linux 上不编译
- 在 Windows 上编译错误 C2131 和 C3863,但在 Linux 上不编译错误
- pthread在Windows中比串行快,但在Linux中比串行慢
- Qt C++macOS问题。我正在使用函数 .find( "a word") 在多集中搜索单词,它适用于 Windows 但不适用于 mac
- strcat 3 char从char []到char *在Windows上工作,但在Cygwin中给出了细分故障
- FCGX_GetParam REQUEST_METHOD可以在Windows中使用,但在Linux中返回NULL
- 为什么我的文件/目录操作在Windows上工作正常,但在Linux上不能
- 我的程序在Windows机器上崩溃了,但在Linux上运行良好
- 在Windows 7下可以从C#调用C DLL,但在Windows 10下失败
- Ostream Tellp在Windows上失败,但在Linux上没有失败
- 枚举在Windows上具有意想不到的价值,但在Linux上没有
- 唯一的字符代码在 Linux 中运行时不起作用,但在 Windows (C++) 中很好
- 我的程序在Windows上使用MSVC和G 编译器运行,但在Linux上不运行