How to set values for variables in a class

I have to create a small program which contains a header file, and an implementation file where the body's of the functions are written and another cpp file to have the main method. I'm totally new to OOP and I have this confusion.

I have declared double variables in the class as private. Now I want to have a function to accept values and set those values to these variables. function body is written in a separate cpp file. When I write it to accept values as parameters and assign them to those variables, compiler gives errors saying those variables are not declared.

Can someone please help?

How are we supposed to help without seeing your code?
Topic archived. No new replies allowed.