Add project files.
This commit is contained in:
parent
12976a36f6
commit
fc6f36a06c
11 changed files with 718 additions and 0 deletions
31
Project1/Main.h
Normal file
31
Project1/Main.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue