consolidate all repos to one for archive
This commit is contained in:
14
semester_2/programiranje_2/naloga0702/PrintUtility.cpp
Normal file
14
semester_2/programiranje_2/naloga0702/PrintUtility.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// Created by Dragana on 31. 03. 2022.
|
||||
//
|
||||
|
||||
#include "PrintUtility.h"
|
||||
|
||||
void PrintUtility::print(const ColorCode &color, const std::string& str) {
|
||||
std::cout << "\033[" << (int)color << "m" << str << "\033[0m";
|
||||
}
|
||||
|
||||
void PrintUtility::print(const ColorCode &color, unsigned int n) {
|
||||
for(int i = 0; i < n; i++)
|
||||
print(color, " *");
|
||||
}
|
||||
Reference in New Issue
Block a user