You can treat your classes like normal types and just put variable of your class type into your other class somewhere.
#include "B.h"
#include "C.h"
class A
{
private:
B my_b;
public:
C myPublicC;
}
That's the complete basics of c++ that you're missing.
So then.... Is B a class, and my_b refers to that class?
Aslo, what would be the difference between having that reference in private or public? It seems kinda odd I mean, another class wouldn't go to that class to get a reference member of the other class would it?
Also I just tried to change it in my ConsoleUtils..... It didn't work. It compiles. But it still does not get the proper variable... -nct is set to True, but it reads it as false.....
ConsoleUtils.h
#ifndef CONSOLEUTILS_H
#define CONSOLEUTILS_H
#include <string>
#include "Genesis.h"
//Debug Console font Modifications
class Font{
public:
void set_color(short int a);
};
//A reference class for modifying, and adding things to the debuc console.
class Log{
public:
Genesis genesis;
void info(std::string a);
void error(std::string a);
void critical(std::string a);
};
class Validate{
public:
bool Digits(const std::string& a);
};
#endif
Would it be possible, for you to show me a simple example of two files, with two different classes, say.... class A needs to get a bool variable from class B, but its in another file. How does it get that? Because apparently something I'm doing is wrong because I never can get the right data from my Genesis class.