嘿伙计们,我正在为我的工作做一个项目,但我似乎无法弄清楚这一点.
我需要接受制造模型和特定产品适合的汽车年限.该程序将编写一个包含文本的文件,该文件将成为我需要的html大纲,并将关键信息插入正确的位置,以便快速将产品添加到我们的网页中.当我使用switch语句或if语句来分隔产品的类别时,输入会搞砸,并且不允许我回答其中一个问题.我不能只使用cin,因为我需要采取看起来像"2008 - 2009 - 2010 - 2011"的日期
这是我迄今为止所拥有的!这个是常规的cin,我试过getline你可以很快我昨天开始我很新,所以原谅我,如果这是一个简单的解决方案,但我找不到任何东西.
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
void proinfo();
int main()
{
//Sytem Information
system("TITLE This is a Beta of My Product Information Template Version 0.0.2");
//I'm using this as a welcome screen to inform users of new improvements on patches and other pertinent information to the users
cout << "Welcome To My Product Information Template Maker!!! \n It Is Still In Development" << endl; …Run Code Online (Sandbox Code Playgroud)