Questions tagged [undeclared-identifier]

257 questions
-3
votes
2 answers

Anybody know how to solve a "viewDidUnload undeclared" problem?

And also how to solve an "expected ';' before '{' token? code below (from xcode 3.2.3) - (void)viewDidUnload { self.cheatName = nil; self.description = nil; } Both errors are in the first line - (void)viewDidLoad { [super…
Bob
  • 41
  • 1
  • 8
-3
votes
2 answers

Use of undeclared identifier alloc?

When I try to create an instance of a custom class, using this code... PlayerTurn *playerTurn = [[alloc] init]; ...inside the definition of a method in my View Controller .m file, I get this error: "use of undeclared identifier alloc" Can someone…
Dave
  • 81
  • 7
-3
votes
1 answer

C++ undeclared identifier when trying to create an instance of a struct

I have a struct that is declared in a C++ header file with the line: struct AII_Common_Export message{ ... }; I am then trying to create an instance of that struct in a C++ source file, so that I can set/ use some of the attributes stored in…
Noble-Surfer
  • 3,052
  • 11
  • 73
  • 118
-3
votes
2 answers

How do I fix error "use of undeclared identifier n" in C?

I'm sure there are probably tons of syntax/other errors, but I'm trying to figure out the two that it's picking up on. I'm very new to this so I don't really know how to fix undeclared identifiers. Note that #include is just CS50's…
-3
votes
1 answer

Program for loop syntax errors

#include #include #include int fun1(int *_array) { for(int i = 0; i < 5; i++) { printf("\nenter an input\n"); scanf("%f", &_array[i]); } } int main() { int _array[5]; int sum; …
-3
votes
1 answer

My function can not access self property since code is centralised

I am fairly new at using xCode, so sorry if this question seems strange. In my app I would like all the views and tableviews to channel their DB (sqlite3) access trough one object. I already got the openDatabase function running but seem to have an…
Jurgen Dictus
  • 346
  • 3
  • 15
-4
votes
1 answer

Why is this 'sz' function not defined?

#include #include using namespace std; #define sz(x) (int)size(x) using ll = long long; using vl = vector; vl psum(const vl& a) { vl psum(sz(a) + 1); for (int i = 0; i < sz(a); ++i) psum[i + 1] = psum[i] +…
-4
votes
1 answer

Undeclared identifier compiling diablo 2 program "muleview"

I get 4 undeclared identifier errors when compiling (Visual Studio 2013) and cannot figure out where and how to declare them. error C2065: 'IDR_MAINWND' : undeclared identifier error C2065: 'ID_FILE_EXIT' : undeclared identifier error C2065:…
Michael
  • 1
  • 2
-4
votes
1 answer

Use of undeclared identifier 'cardNum'

I'm using a function of the library CS50 on cs50's environment, and this is how you store a value on a variable gathering it with an input: long i = get_long("Enter a long: "); Here comes my code: #include #include #include…
-4
votes
1 answer

Use of undeclared identifier 'startClient' ERROR

I am writing an application in Objective C and I keep getting a Use of Undeclared Identifier 'startClient' error. I have attached a link to my project file and the tutorial link is here:…
-4
votes
1 answer

error: 'SetPosition' was not declared in this scope

Arduino: 1.6.9 (Windows 10), Board: "Arduino Mega ADK" In file included from C:\Users\Disheet\Downloads\humanoid_1\humanoid_1.ino:1:0: C:\Users\Disheet\Documents\Arduino\libraries\ax12v2/ax12.h:66:23: error: conflicting declaration 'typedef unsigned…
-4
votes
1 answer

Objective-C use of undeclared identifier 'numberOfSectionsInTableView'

Not sure where I went wrong. My understanding is that importing UIKit will enable use of the numberOfSectionsInTableView method... Any help is appreciated. //HEADER #import @interface MainScrollingTableVC : UITableViewController…
Purp
  • 1
  • 1
-5
votes
3 answers

Why is "number" undeclared when I declared it in the function?

#include void numberisone() { int number = 1; } int main() { numberisone(); printf("%d", number); return 0; } I'm fairly new to programming so make the explanation as simple as possible :) Thanks in advance!
flyerz
  • 13
  • 5
-5
votes
2 answers

'Stack' Undeclared Error . Java to C

For My class , I am supposed to translate a code that was provided to us and translate it from Java to C. This is my first encounter with C. So i completed that . After Compiling i receive about 6 errors saying that Stack is not declared.And Stack…
DJ023
  • 1
  • 3
-7
votes
1 answer

Why does this tell me that "gender" is an undeclared identifier on line

int main() { introduction(); int x; cin >> x; if (x == 1) cout << endl << "1. Only state true information." << endl << "2. Do not copy this servey and distribute it AT ALL." << endl << "3. Do not falsely advertise this survey…
1 2 3
17
18