Jump to content

Para que serve ->


Recommended Posts

Isso depende da situação. Por exemplo:

typedef struct sPessoa {
int idade;
char* nome;
} Pessoa, *pPessoa;

Pessoa p1;
pPessoa p2;



Isto para dizer que depende do tipo da variável que tens. No exemplo que dei, a variável p1 era uma struct, logo utilizava o operador '.'. A variável p2 era um apontador para struct, logo usava a seta '->'.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.