When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
17 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
you surely did int& instead of int* = nullptr; did you?
nope
where would I have to put int& anyway
or int* = nullptr
into the declaration of the int or the reference from another class
I am doing the reference in the function if that helps
I just wan't to add 1 to the int everytime the function is called. And the int is in the other class than the function
filefromclass1.h
Class 1 : public base
{
public:
int xyz = 0
};
filefromclass2.cpp
#include "filefromclass1.h"
#include "filefromclass2.h"
#include "base.h"
void class2::create(void)
{
xyz = xyz + 1;
some other code here
}
And yeah. Idk how to make that thing in class 2 work