31 lines
536 B
C++
31 lines
536 B
C++
/*
|
|
* Clock app for Project One
|
|
* Main.h header file
|
|
*
|
|
* Date: 2022/03/16
|
|
* Author: Cody Cook
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
void clearScreen()
|
|
{
|
|
// Clear the screen
|
|
system("CLS");
|
|
}
|
|
|
|
void clearCin()
|
|
{
|
|
/* When the cin potentially contains bad data;
|
|
* like alphabeticals when looking for unsigned integers.
|
|
* Doubles as a pause function, surprisingly, if necessary.
|
|
*/
|
|
|
|
// clear the cin and also ignore the rest of the line
|
|
cin.clear();
|
|
cin.ignore(numeric_limits<streamsize>::max(), '\n');
|
|
} |