how to initialize an struct object in c++
// exemple avec la structure Coordonnees :
struct Coordonnees
{
int x;
int y;
}
int main()
{
Coordonnees coords = {1,2};
}
how to initialize an struct object in c++
// exemple avec la structure Coordonnees :
struct Coordonnees
{
int x;
int y;
}
int main()
{
Coordonnees coords = {1,2};
}
c++ initialize a struct
struct address {
int street_no;
char *street_name;
char *city;
char *prov;
char *postal_code;
};
address temp_address = {
0, // street_no
nullptr, // street_name
"Hamilton", // city
"Ontario", // prov
nullptr, // postal_code
};
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us