小编Eri*_*ood的帖子

为什么我的if/else语句不能产生预期的结果?

我的程序有问题.我几乎已经完成了它,但最终结果并没有成功.我已经用两种方式编写了它,一种是带有switch语句,另一种是if else语句但是它们都没有用.它们都为我编译并具有干净的构建但不会按预期运行.

#include <iostream> 
#include <cstdio>
#include <iomanip>

using std::cout;
using std::cin;
using std::endl;

int main()
{

    int i = 0;
    const int size = 27;
    char newline = '\n';
    char *pnumber = 0;
    int selection = 0;

    cout << "PRINGING CONTENTS OF ARRAY" << endl;
    cout << "====================================================" << endl;
    char alphabet[size] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'
    , 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y' …
Run Code Online (Sandbox Code Playgroud)

c++ arrays pointers

0
推荐指数
1
解决办法
95
查看次数

标签 统计

arrays ×1

c++ ×1

pointers ×1