Questions tagged [undeclared-identifier]
257 questions
0
votes
2 answers
Undeclared identifier that is declared?
I am making an app where if the webpage doesnt load, it gives an error and returns to the previous screen. However, in doing this, after all the code, get an undeclared identifier
#pragma mark - View lifecycle
- (void)viewDidLoad
{
UIAlertView…

Sam
- 163
- 1
- 13
0
votes
1 answer
Adding Annotation from Property List - use of undeclared identifier
I am trying to add an annotation from property list. I found a solution here:
Xcode Annotation from Property List
but it gives me an error "use of undeclared identifier "racks"" and "use of undeclared identifier "GetRacks"" here:
// Add…

Pavel Kaljunen
- 1,291
- 2
- 26
- 53
0
votes
2 answers
ObjC: Can't access ivar of custom class from outside
I'm attempting to make a basic game in cocos2d, and I've gotten to the point where I'm attempting to scroll the background depending on the hero sprite's position. The hero's created alongside the controls in a class called GameplayLayer, and all…

Luke
- 9,512
- 15
- 82
- 146
-1
votes
1 answer
How can I fix IERC20 & IAccessControl interfaces causing 'Undeclared Identifier' error?
I'm trying to use the OpenZeppelin IERC20 & and IAccessControl interfaces instead of importing the normal contracts to prevent maxing out on size.
When I was using the normal contracts, everything worked fine, except the size on some of my…

D369
- 33
- 4
-1
votes
2 answers
First use in this function
I started learning C recently, and whenever I try to run this it's giving an error of "a" and "b" undeclared as first use in this function, even, though the course I was watching ran the same code with no erros, he just changed the number to 10 and…

AbsoluteNothing
- 3
- 3
-1
votes
2 answers
Getting rid of "Undeclared identifier" errors
So I was doing a linked list assignment where given two numbers in a linked list form, add the numbers up and make the final answer in a linked list form. I keep getting an "undeclared identifier" error for my code and I was wondering how to fix…

FutureEngineer123
- 1
- 1
- 2
-1
votes
1 answer
system call to write and read from a file
I want to test the system call of read and write
#include
#include
int main(void)
{
fd = open("/Users/me/Desktop/PubRepo/C/APUE/3.File_IO/test", O_RDWR);
write(fd, "Test the first line",20);
}
The cc reports:
In [29]:…

AbstProcDo
- 19,953
- 19
- 81
- 138
-1
votes
1 answer
Accessing other unit constant in Delphi
I have a simple project in Delphi:
program Project1;
uses
Forms,
Unit2 in 'Unit2.pas',
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Unit1:
unit…

re_things
- 679
- 1
- 8
- 29
-1
votes
2 answers
Use of unresolved identifier 'questionList"
I know this error means that the compiler doesn't recognize the name, but I'm not sure how to fix it. How would I set the variable differently in order for it to function correctly? I assume it has to do something with questionsList being a var as…

sheishistoric
- 85
- 1
- 9
-1
votes
1 answer
was not declared in this scope
I'm getting back to c++ because they want that from me for the school but I ran into problem.
I defined struct like this:
struct Member{
string Name;
string Surname;
Member* Next;
};
and 2nd structure:
struct List{
string Name;
…

Jiří Matyáš
- 13
- 2
-1
votes
1 answer
C2065: 'class' undeclared identifier, header included
I wanted to run the game by testing the spawner. I thought that I had properly declared the Spawner class by calling its header file in SceneGame.hpp
When I wanted to use the Spawner* as a vector variable, I thought there would be no compiler…

JBRPG
- 141
- 1
- 2
- 10
-1
votes
1 answer
Undeclared update indenifier
#import "MainScene.h"
static const CGFloat scrollSpeed = 80.f;
@implementation MainScene {
CCSprite *_hero;
CCPhysicsNode *_physicsNode;
CCNode *_ground1;
CCNode *_ground2;
NSArray *_grounds;
NSTimeInterval…

Zach Beydoun
- 1
- 1
-1
votes
3 answers
Is it recommend that a PHP classes variables are declared, or undeclared?
Take the following example:
class MyThing {
public function __construct($a, $b) {
$this->a = $a; $this->b = $b;
}
}
Do the PHP authors recommend using the above approach, or declaring $a and $b with private $a = "default"…

Magnus
- 101
- 5
-1
votes
2 answers
How to use and make a GLOBAL variable to use in different functions?
I know I need to avoid global variables as much as possible but somehow I need to use certain variables in other functions.
This program is a recipe program. Adds, deletes and views recipes. Everything is working. Maybe not the best code but it…

user3080068
- 1
- 2
-1
votes
3 answers
Undeclared identifier that was defined within a do-while loop
Here is my code:
#include
#include
#include
int main(void)
{
int answer_compared;
do {
printf("What is your credit card number?\n");
long long credit_card = GetLongLong ();
printf("Is…

user3289714
- 9
- 1
- 1