For C++ experts out there, did you make stupid mistakes like this when you first started?
And also, how long did it take you to get familiar with C++
C++ is the first language I am learning, I have basic knowledge of HTML, PHP and stuff like that but C++ is the first language I'm going to be dedicating time into
well....considering "1 > 3" is a boolean checking it makes perfect sense because it return values (in this case, it is false ) although I see no purpose of the if being there
yes, every expert made mistakes getting started. Mismatched {}s. Failed to include the header for the needed calls. for(); (does nothing N times because of the do-nothing ; on the end!). if(); (conditionally does nothing, then does the next block every time, ; again error). Everyone has done it. Most of us still do it once in a while, but we know how to find it fast when we goof due to experience. And compilers warn about more of this stuff than they once did.
It takes a couple of years to get pretty good at c++ and more like 5 years to be a grand master. And the language keeps changing and growing, which is another frustration... put it down for just a few years and its not the same when you come back (suffering this issue myself!)
The good news is that c++ pulls in a lot of near freebies. Knowing it, you can pick up java, c#, python, and several other languages that were based off c++ or C syntax. I can read and edit all these, without knowing them, with just my C++ background + google.
Don't worry about the comment... your first couple of programs don't have to make a lot of sense. Most early programs are contrived examples and dumb problems that you can solve with 1/10 the code later once you know how. They are just there to teach you some things.
We need your error messages if you have something not working. Your second one looks ok, but what did it say or do?
Whatever your linker is complaining about, it's not this code. I expect you're trying to build some other code. Perhaps you chose the wrong kind of project. Visual Studio is not a great IDE for a beginner.
be sure you did a rebuild all in your project. The other options can leave junk from earlier mistakes (its an efficiency thing, if you have a huge project, and only 1 file in 30 changed, it does not need to check the other 29 in every situation ...)