cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
how to display structure content ?
how to display structure content ?
Dec 17, 2014 at 12:42am UTC
sega2010
(1)
i need help to display all the content of the ( codedParams & modeParam ) in the next piece of code
struct SAOOffset
{
SAOMode modeIdc; // SAOMode is an enumerator
Int typeIdc;
Int typeAuxInfo;
Int offset[MAX_NUM_SAO_CLASSES];
SAOOffset();
~SAOOffset();
Void reset();
const SAOOffset& operator= (const SAOOffset& src);
};
struct SAOBlkParam
{
SAOBlkParam();
~SAOBlkParam();
Void reset();
const SAOBlkParam& operator= (const SAOBlkParam& src);
SAOOffset& operator[](Int compIdx){ return offsetParam[compIdx];}
private :
SAOOffset offsetParam[MAX_NUM_COMPONENT];
};
class_x::func()
{
SAOBlkParam modeParam;
SAOBlkParam* codedParams ;
codedParams[ctuRsAddr] = modeParam;
}
Dec 17, 2014 at 2:51pm UTC
tanezavm
(72)
use cout to display something.
you can use the . operator to a struct object to access its members and print it out using cout.
you can use the -> operator to a pointer to a struct object to access its members and print it out using cout.
http://www.cplusplus.com/doc/tutorial/structures/
Topic archived. No new replies allowed.