Hi people i need yor help. It must be easy for you but im starting with c++ and i can not figure put how to do this:
I have two classes, each on with the .h and .cpp files and a main class that must call the objects created for those classes. Here is a template:
class1.cpp
int ClassA::function1()
{
...
return a
}
int ClassA::function2()
{
}
classb.cpp
int ClassB::function3()
{
}
int ClassB::function4()
{
}
main.cpp
#include "class1.h"
#include "class2.h"
int main (int argc, char* argv[])
{
Class1 class1;
Class2 class2;
class1.function1();
class2.function3();
return 0;
}
So what i need to do is to pass the data returned in class1.function1(); and use it in class2.function3();
For example class1.function1() returns "int a" then i need in class ClassB::function3() write somthing like:
int b = a *2;
Thanks in advance!!