typedef problem | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

typedef problem

#include <stdio.h> #include<string.h> typedef struct deneme{ //typedef bir değişkene 2 farklı değer verebilmemizi sağlar int x; char y[100]; }call; int main(){ call=call1; call=call2; call1.x=5; call2.x=6; strcpy(call1.y,"hello"); strcpy(call2.y,"hi"); printf("%d %s\n%d %s",call1.x,call1.y,call2.x,call2.y); } not working please help guys

28th May 2020, 8:19 PM
Abc def
Abc def - avatar
1 Resposta
+ 3
it should be call call1 and call call1 because call is now a new datatype which you can use like int and char
28th May 2020, 8:34 PM
āœ³AsterisKāœ³
āœ³AsterisKāœ³ - avatar