answersLogoWhite

0


Best Answer

Use the member accessor (.) operator.

struct object {

int m_data;

};

int main()

{

object o;

o.m_data = 100;

std::cout << o.m_data << std::cout;

return(0);

}

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Syntex for accessing data members of the structure in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is it mandatory to declare the structure variable of a structure to access the data members?

true or false


What is database administartor?

dba is a person or group of persons who manages the data nd defining db structure,storage structure, accessing methods nd backup techniques


The process of accessing data stored in tape is similar to manipulating data on a?

It is just like accessing a Queue


What are public data members in a class?

Public data members are akin to structure data members (which are public by default). Since they are public, they are fully exposed outside of the class. Data validation becomes impossible. Even if you define an interface, there's no requirement to use it since the members are readily available. If the members must be validated, do not assign them public access.


When class will be used and when structure will be used?

In class default members are private and in structure default members are public ,When ever you want to hide data from outside functions then you can use class.But in ANSI C we can hide data by using private access specifier.


What are the goals of data structure?

To arrange data in a particular manner.these manner or set of rules is defined in the data structure so that the data used in computer systems can properly used at necessary time.


What is an association list?

An association list is a data structure which associates keys with data, implemented as a list whose members are paired storage locations.


What is indirection in c?

Accessing data via pointers.


What is sensor data?

It is the process of collecting,organizing and accessing data with the help of computer sensors.


What are the subject-matters of data structure?

types of data structure types of data structure


What is the important of pointer in c programming?

It is accessing data by address.


What is sensor data capturing?

It is the process of collecting,organizing and accessing data with the help of computer sensors.