class variable problem

hi there,
i am an embedded software programmer.
i use c language for my programs but due to
a need i have to write a program for a divice in c++.
the problem is that i want to create an object that has a
variable that is automaticaly changed by the machine and i do
not want to set it all the time. the machine has a register for
that but no address in order to pass the address and not the value.
how can i do that?
any ideas?
thanks
This isn't a standardised feature and so depends on your compiler. In principle, it shouldn't be any different from your C compiler.
You can assign the value of the register to the variable on Object instantisation and then u can pass the address of the variable.
ashwani what you mean "Object instantisation"?
can you be more specific or give an example?

thanks
you can do this way
class
{
register a;
b=a;
class(a)
{
}

};
main()
{
class obj(a)
}
That doesn't guarantee that a register will be used or which register will be used, nor does it do anything about interfacing with hardware that's communicating thru registers.
Topic archived. No new replies allowed.