Yami Yugi wrote:
Aspect wrote:
#include <iostream>
bool testGame(std::string _gameName)
{
if(_gameName == "League Of Legends")
std::cout << "Shit game tbh";
}
int main()
{
std::string gameName = "League Of Legends";
testGame(gameName);
}
????????????????????????
I have a feeling you didn't understand what i meant so here, i shall simplify:
#include <iostream>
#include <unistd.h>
struct Games
{
char* gameName;
};
Games gameList[] =
{
{"League_Of_Legends "},
{"Dota "},
{"Cs:GO "},
{"Garrys_Mod "}
};
bool rateGame(Games* gameList);
int main()
{
rateGame(gameList);
}
bool rateGame(Games* gameList)
{
unsigned int microseconds = 70000;
for(int i = 0; i < 42; i++)
{
std::cout << gameList->gameName[i];
usleep(microseconds);
}
std::cout << "" << std::endl;
usleep(550000);
std::cout << "\nWhich game is bad?" << std::endl;
usleep(550000);
std::cout << "Answer:\n" << std::endl;
usleep(550000);
for(int i = 0; i < 17; i++)
{
std::cout << gameList->gameName[i];
usleep(microseconds);
}
usleep(350000);
}
please don't run the code online, it would deeply offend me (download codeblocks (IDE))