Hi learning a new language and need some to tell me all the ways my code is wrong so i can learn .

For cout, use <<, cin >>, you've mixed and matched. Also, you need a << between strings and an endl. Here is an io streams overview

You have a line else (more2 == 32){ It looks like you might be trying to use an else if here. A bare else can not have a test, that else always runs if the other ifs don't match. Here is a description of how an if/else if/else chain works.

Like 110 has goto errorreset: with a colon (:), this is invalid code, you probably just typoed when going for a semi-colon (;).

You prompt the user to enter menu selections, but never read their entry into more and more2.

I haven't used ofstream/ifstream in ages, so I can't tell if you're using them right, but I can tell you for sure you do not create the filename for the ifstream properly, look at what you did for ofstream.

Here are some things that are not wrong, but I'm going to suggest you change anyway. At the end of the day it's all up to you, but these are the sorts of things programmers just do because once you get in the groove of doing them your life will just be easier. Using goto is fine, it's just makes everything a bit more complicated than it has to be. You should use a consistant indentation style, just makes reading things easier later on. Comments should be above the thing they describe, not below. Don't put line numbers in comments, as soon as a single line is added / removed the comment can become wrong.

Make these changes and see if you can get it working. Once you're there, we can do another iteration of review.

Side note: In general try writing smaller chunks of your program at a time and it will be easier to spot the problems as you go. For example, you could get just entering the employee number working, and write it back to the user. Then add in opening the file, and making sure that bit works. Then add in the math.

/r/badcode Thread Link - pastebin.com