My hello.cpp compiled and printed but I still got red errors showing

I am very grateful for the rework of the install videos and the step-by-step process this time. It all seemed to work better than the last three days attempts but I still got a bunch of red text in the terminal. When I did the Run Build Task…it did show that it was successful. It was when I clicked in the Terminal area and hit a key on my keyboard that the red text showed up with the white text prompt below it. I went ahead and typed “.\hello” anyway and sure enough, it displayed my print statement. But why did I get all the red text?

Here is the screengrab. thanks for any help and thanks again for reworking the video to do a hand-held walkthrough.

I think it might be because your “f” after “print”. It must be print(“some text”);
not printf(“some text”);
Hope this will help you! :slight_smile:

Well it got rid of the red but it now it just shows errors and I have a squiggly line under “print”

Not exactly sure what is this int main(). Probably some method or something like this try to change it somehow to original methods or try to change “print(“some text”);” to “Debug.Log(“some text”);”

I must have somehow posted to the wrong forum topic. I am taking a course entitled, “C++ Fundamentals: Game Programming For Beginners” and this is my following the instructor in creating my first program.

Thank you for trying to help but I think you are assuming I know more about what I am doing than I know.

1 Like

I just saw it said cpp, also yeah. I learn now about Unity 2D C#, so probably can’t help you with cpp and tell you things I saw from my courses, so yeah. Good luck with searching for answers, anyway! :slight_smile:

1 Like

@mwsheeler Sorry Michael. print(...) is not a function defined in (CSTDIO). printf(...) is, and it is what the instructor specified. with print the compile process looks for a library that provides a function of that name, and there was none found :).

Sometimes, people guess from knowledge that does not apply to the problem in hand, such as for the FC_CPP course.

Thanks again orcmid. I knew I wasn’t doing that part wrong. Thanks to the autofill where it has printf as the first option when I begin to type it out.

Was kind of "tutorials and games to offer support.

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

Privacy & Terms