You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int main (){
char v;
char * z;
c *x;
x->a=2;
x->b= f(2,3);
v = '\n';
try{
z = "abacasad";
} catch (...) throw;
return 0;
}
Dá erro de atribuição de tipo nas linhas :
x->a=2;
x->b= f(2,3);
[SEMANTIC ERROR - assignNode] CANNOT ASSIGN AN EXPRESSION TO A DIFFERENT TYPE, line: 22
[SEMANTIC ERROR - callNode] PARAMETER TYPE MISMATCH, line: 23 parameter: b
The text was updated successfully, but these errors were encountered:
joraojr
changed the title
Atribuição por retorno de função está pegando o tipo do parâmetro
Atribuição por retorno de função não está pegando o tipo do função
Dec 3, 2019
joraojr
changed the title
Atribuição por retorno de função não está pegando o tipo do função
Atribuição por retorno de função não está pegando o tipo do função e do struct
Dec 3, 2019
Para o código
typedef struct {
int a;
float b;
} c;
float f (int c, float b) {
c = c + 2;
b = b + 1.21;
if(a)
b = 2e10;
return b;
}
char v;
int main (){
char v;
char * z;
c *x;
x->a=2;
x->b= f(2,3);
v = '\n';
try{
z = "abacasad";
} catch (...) throw;
return 0;
}
Dá erro de atribuição de tipo nas linhas :
x->a=2;
x->b= f(2,3);
[SEMANTIC ERROR - assignNode] CANNOT ASSIGN AN EXPRESSION TO A DIFFERENT TYPE, line: 22
[SEMANTIC ERROR - callNode] PARAMETER TYPE MISMATCH, line: 23 parameter: b
The text was updated successfully, but these errors were encountered: