full scripts in support files?

I am just starting to learn c++.. I am a little confused how header (.h) and extra (.cpp) files work.

I made a simple (and working) add two numbers together program.

However when I put the scripts in another (.cpp) file, then from main call the functions... it causes CIN to not declare what x and y are anymore. (I tried putting the code in header too without the other .cpp to try another option)

Can something like this not be done?

If you want more specific help, post your code and I'll look it over.
Topic archived. No new replies allowed.