So, I'm just learning how to do C++. I'm required to change the Hello World code to show my name. I changed it but for some reason when I run the code nothing shows.
I get no errors but no output either.
1 2 3 4 5 6 7
#include <iostream>
usingnamespace std;
int main() {
cout << "Name" << endl; // prints name
return 0;
}
If the code is correct, what could be the problem?
lol...you just copied the code. You should go back and read it for its intended purpose, which is to help you figure out what's wrong with that code. What you copied in there is way too advanced for you to have done, and your instructor will see that instantly and fail you. I didn't point you over there so you could jack someone's code, I pointed you over there so that you could read the topic and get something out of it.
Believe me, if I wanted to just give you the answer, I could just do it. Your first program was written just fine, it's about how you're running the program.
That was kind of stupid of me to copy it.
Okay, I'll take the long way around and look into how I'm running it. What's irritating me is my TA is telling me to do stuff and I'm like "I did that already."