49 lines
1.6 KiB
C++

#include <iostream>
#include "Racunalnik.h"
#include "Sablone.h"
int main() {
system(("chcp " + std::to_string(65001)).c_str());
std::cout << "--------Print color------------------------------------------\n";
std::vector<Racunalnik> rac;
rac.emplace_back();
rac.emplace_back();
print<ColorCode::Red>(rac);
std::cout << "------Vector v vectorju--------------------------------------------\n";
std::vector<int> st;
for (int i = 0; i < 20; ++i) {
st.push_back(rand());
}
print<ColorCode::Blue>(st);
std::vector<std::vector<int>> slic = slice<3>(st);
for (int i = 0; i < slic.size(); ++i) {
print(slic[i]);
}
std::cout << "---------Prepoveadni znaki-----------------------------------------\n";
std::vector<std::string> besede;
std::vector<std::string> prepovedano;
besede.emplace_back("ena");
besede.emplace_back("dva");
besede.emplace_back("tri");
besede.emplace_back("stiri");
besede.emplace_back("pet");
prepovedano.emplace_back("dva");
prepovedano.emplace_back("stiri");
std::cout << toSafeString(besede,prepovedano);
std::cout << "---------Reverse-----------------------------------------\n";
std::vector<int> rev = reverse(st);
print(rev);
std::cout << "---------Sestevanje-----------------------------------------\n";
double num = sum(st);
std::cout << num << "\n";
std::cout << "---------printSelectedWordInColor-----------------------------------------\n";
std::string t = "600W";
printSelectedWordInColor(rac,t);
return 0;
}