Я не очень понял, что делает ваша программа
она не распознает функцию eof() и выдает ошибку
Я не очень понял, что делает ваша программа
Ошибка указывает именно на эту строку и функцию, и программа не видит эту функцию
Разберитесь в разнице между точкой и стрелочкой.
if (B>0) <
N6 Click -> Enabled=TRUE;
SaveDialog1->Execute();
В в остальном коде, ругается на
N6 Click -> Enabled=TRUE;
на это тоже соотвественно
[BCC32 Error] Unit1.cpp(253): E2288 Pointer to structure required on left side of -> or ->*
В любом случае SaveDialog так не используют, он просто откроется, но ничего не сохранит.
Надо примерно так:
if (SaveDialog1->Execute()) <
Memo1->Lines->SaveToFile(SaveDialog1->FileName);
>
Can anyone help me how to correct this error: Structure required on left side of . or .*? when i run the program, it gives me this error and it is pointing to hit() function. i can’t find what causes this error.pls help.thanks.
3 Answers 3
This is a compile-time error, not a run-time error. It happens because you are attempting to access .x and .y on elements of an array of type int[] . Integers are not struct s, they do not have fields x and y , so compiler tells you it’s an error.
The most likely fix should be changing the type of trd array parameter of the hit function as follows:
Note that since you are using the function before declaring it, you should add a prototype at the top.
trd is an int array. int has no member n or x .
Fix the function signature to int hit(TSK trd[], int life, int ply)
In your hit function, the trd argument is an array of int s. Did you mean to make the argument of type TSK[] instead?
Not the answer you’re looking for? Browse other questions tagged c structure or ask your own question.
Linked
Related
Hot Network Questions
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2020.1.17.35809