小编Cod*_*yez的帖子

C++ argv []未完全传递

// Type the determine year in the command line as an argument.
// This program then prints the months and days for that year.

//Known Error argv[1] = the first digit of year,

#include "stdafx.h"
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

void printYear(int year);

int _tmain(int argc, char *argv[]){ 
    string str;//varible used to exit the program

    if (argc == 1 ){//checks to see if the years were inputted corrected
        std::cout << "Please input Year in the command …
Run Code Online (Sandbox Code Playgroud)

c++ arguments

7
推荐指数
1
解决办法
175
查看次数

标签 统计

arguments ×1

c++ ×1