"Hello, World!" message won't go away

Hello, I’m going through the Unreal Engine C++ Developer course and currently on Lesson 17 called “Hello, World!” in Section 2. I was following along with the video and got the compiler to give the “Hello, World!” message. However, when I tried to change the message to say “You are a secret agent breaking into a secure server room…” instead as shown in the video around the 6:45 mark, I keep getting the same “Hello, World!” message in the terminal again just like I did before.

I also noticed that where it says std::cout << in the video are all the color white in the video, but on my screen they are different colors. I don’t know if that matters, but I thought I’d mention it.

Here is a screen shot of what I’m seeing on my screen:

How do I get the “Hello, World!” message to go away and replace it with the “You are a secret agent” message instead?

Please help!

if you are on windows to compile i believe you have to type cl triplex.cpp

to run triplex

for mac its g++ -o triplex.cpp triplex

then to run it ./triplex

Sounds way too much like you’re not re-compiling after making changes. Its not instant.

I am on Windows 10. I typed cl triplex.cpp as you suggested and got a bunch of text.

Like so:

But then when I typed just triplex by itself again (without the cl or .cpp), I got the “You are a secret agent” text.

Like so:

In short, I still have no idea what happened, but it appears to have solved the problem at least for now.

Thank you and let me know if you have any further insights as to what is going on.

Could you elaborate on what you mean a bit more? I’m completely new to all of this and not sure what you mean by “re-compiling”.

How do I know when something has been re-compiled?

You’re definitely just beginning :slight_smile:

So what Helpful got you to do is to compile your project. You can see in the 1st image of your 2nd reply with photos (the one where it works) that it produced an exe.

When you work on a project, you have to have a compiler re-work it into something that can be used. The computer can’t use your project as you use it. You compile to something usable.

So you work on your project, you compile. You can run and test the compiled code. You then work on your project some more, you compile again, rinse and repeat.

Now, UE4 game projects are a little different where your project is running in the editor and you can make many changes that way and some not but you still need to compile the project for others to use it which is more similar to VSC here.

Also to note, in bad cases, the code application (eg VSC) has a bug or adds a new setting and it might appear that changes aren’t being made. That’s something else to look forward to lol.

Gotcha. Thank you very much for going more in depth into all of that.

Truth be told, I have absolutely no idea what I’m doing, so the detailed explanations are especially helpful :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms