0
My doubt is how I successfully pass the text from one char variable to another also char?
I’m trying the following:
salva_nomeMaior[30] = dados[i].nome;
The variable that is with the text that is received from the user is inside a struct. However when I do a printf()
in salva_nomeMaior[30]
it just returns symbols.
The question needs more context, such as the format of this struct and the types of variables in the example line.
– epx
Answering what is possible for now: you seem to be confusing the char type with the char* type. The first is a simple character, actually a small number. C strings have the char type*.
– epx
Welcome to Stack Overflow in English, please edit your post by adding a [MCVE] showing what you’ve done, because only then can we provide you with more assertive guidance on your problem. Meanwhile read [Ask], in case of doubts [help] and do our [tour].
– Augusto Vasques