Sorry, I have a thread on this forum that my question was not answered. I thought that there was only one problem with my program, but it turns out that there is a lot incorrect with it. Several people pointed this out to me, but no one solved my basic problem. I couldn't figure out why my program always skipped to the end. It would be great if someone could help me with this issue.
Make sure to ignore what I put in for the answers, they might not match up because I obviously wouldn't put who I thought was hot on this forum. I also changed my passwords and stuff because I don't want you to know them (duh). So don't focus on that.
#include <iostream>
#include <string>
std::string answer, answer2, answer3, answer4, answer5, answer6, answer7;
int main()
{
std::cout << "Make sure you capitalise only what needs to be capitalised."<< "!\n";
std::cin.sync();
std::cin.get();
system("CLS");
std::cout << "What is the best spy of all time in movies?" << "!\n";
std::getline (std::cin,answer);
system("CLS");
std::cout << "What is your name?"<< "!\n";
std::getline (std::cin,answer2);
system("CLS");
std::cout << "What is your favorite color?"<< "!\n";
std::getline (std::cin,answer3);
system("CLS");
std::cout << "Who built the house where you lived in for the majority of your life? Type his last name."<< "!\n";
std::getline (std::cin,answer4);
system("CLS");
std::cout << "What girl in 8th grade when you were in 7th grade did you think looked hot but wasn't muy intelligente? First name only."<< "!\n";
std::getline (std::cin,answer5);
system("CLS");
std::cout << "What was the name of the first camp (CYO) that you went to? Type 'Camp' and then the name of the camp."<< "!\n";
std::getline (std::cin,answer6);
system("CLS");
if ((answer == "James Bond") && (answer2 == "Bob") && (answer3 == "green") && (answer4 == "Burt") && (answer5 == "hurpdurp") && (answer6 == "Camp Won Flosco")) //don't focus on!
{
std::cout << "Make sure no one else is looking. You will be looking at sensitive information. Would you like to continue?"<< "!\n";
std::getline (std::cin,answer7);
if (answer7 != "yes")
{
return 0;
}
system ("CLS");
std::this_thread::sleep_for(std::chrono::milliseconds(1000)) ; //both 'this thread' and 'chrono' are giving errors that say anything following '::' needs to be a class or whatever
std::cout << "5"<< "!\n";
std::this_thread::sleep_for(std::chrono::milliseconds(1000)) ;
system ("CLS");
std::cout << "4"<< "!\n";
std::this_thread::sleep_for(std::chrono::milliseconds(1000)) ;
system ("CLS");
std::cout << "3"<< "!\n";
std::this_thread::sleep_for(std::chrono::milliseconds(1000)) ;
system ("CLS");
std::cout << "2"<< "!\n";
std::this_thread::sleep_for(std::chrono::milliseconds(1000)) ;
system ("CLS");
std::cout << "1"<< "!\n";
std::this_thread::sleep_for(std::chrono::milliseconds(1000)) ;
system ("CLS");
std::cout << "0"<< "!\n";
system ("CLS");
std::cout << "I'm not going to show my passwords on this forum (Duh)."<< "!\n";
std::cin.sync();
std::cin.get();
}
else
{
std::cout << "You have entered a wrong answer and are not allowed"<< "!\n";
std::cout << "to pry into the information in this program. Any more wrong attempts to gain access to the info enclosed will be regarded"<< "!\n";
std::cout << "as an attack and the maker of this program will be notified. The said maker of this program is now warning you that any other"<< "!\n";
std::cout << "attempt to gain access is an invasion of privacy and therefor permits him to gain access to your computer. The said person hereby"<< "!\n";
std::cout << "offers this disclaimer to show that you have been warned and if you continue to meddle he has the right to launch the malware"<< "!\n";
std::cout << "embedded into this program. This program has malware securely stored and if there are three or more failed attempts the malware"<< "!\n";
std::cout << "shall be inputted and embedded into your software. You have been warned!"<< "!\n";
std::cin.sync();
std::cin.get();
}
return 0;
}
L B....I've had that thread open for over a week. I haven't spammed the forum, just calm the heck down.
Disch, thank you for contributing to this thread. You solved the problem! Even though this program was pretty simple (or at least it should have been), I still learned a lot. Thank you all!
I've had that thread open for over a week. I haven't spammed the forum, just calm the heck down.
This thread was right above your old thread in the list, and the last post in your old thread wasn't even 20 minutes old when you made this thread. I consider that spam, sorry if you don't.
Creating more than one thread for the same question is a bad way of doing things, because it splits any potential discussion over two threads. Someone might answer in one thread, unaware that there is another thread in which the question has already been answered. It wastes people's time.
This is basic common sense. When someone tries to explain this to you, they are being helpful, both to you and to the rest of the forum. Insulting them for that is childish and obnoxious.
Speaking of basic common sense - I'm curious: How did you come to the conclusion that insulting people on this forum would make it more likely that people would give up their time to help you? I'd be fascinated to hear the reasoning behind that one.