Questions tagged [undeclared-identifier]
257 questions
2
votes
1 answer
C++ Undeclared Identifier (but it is declared?)
I'm pretty sure I've included the qanda class, but when I try to declare a vector that contains it or a class of that type I get an error saying that qanda is undefined. Any idea what the problem might be?
bot_manager_item.h
#pragma once
#include…

Joshua
- 547
- 1
- 5
- 13
2
votes
1 answer
error C2065: 'OCR_NORMAL' : undeclared identifier
I am using Visual Studio 2010 C++
How to remove this error?
error C2065: 'OCR_NORMAL' : undeclared identifier
near
wc.hCursor =
(HCURSOR)LoadImage(NULL, MAKEINTRESOURCE(OCR_NORMAL), IMAGE_CURSOR, 0, 0, LR_SHARED)
The answer is bellow: that helped…

John Boe
- 3,501
- 10
- 37
- 71
2
votes
1 answer
'Use of Undeclared Identifier' in AppDelegate (iOS)
Running into a bit of an issue.
This is my first time really dealing significantly with an AppDelegate.h/.m file.
I've declared a property @property float centerFreq in AppDelegate.h. Then I synthesize it in AppDelegate.m like so: @synthesize…

Roshan Krishnan
- 187
- 1
- 3
- 13
2
votes
4 answers
c++ Why is variable "file" undeclared when I have declared it?
I am using visual studio 2012 writing normal c++ and I keep getting this error for a variable I have declared.
1>c:\users\joe\skydrive\documents\c++\consoleapplication2\matracies 1.cpp(182): error C2065: 'file' : undeclared…

Norno3
- 87
- 1
- 11
2
votes
1 answer
Error C3861: 'ResGain': identifier not found
essentially I'm writing a short script. The easiest way to look at is that it's for a game with a resource collection. ResGain is the resources gained, and BonusGain is the chance to earn an extra resource. I am getting Identifier not found errors…
2
votes
1 answer
QButtonGroup undeclared identifier?
In my project, I have 256 PushButtons and I made a function that adds them all to a QButtonGroup.
void MainWindow::AddBlocksToGroup()
{
QButtonGroup* blockGroup = new QButtonGroup(this);
blockGroup->addButton(ui->Oblock_0, 0);
…

mrg95
- 2,371
- 11
- 46
- 89
2
votes
2 answers
Accessing external function using function pointer in C
Im trying to link to a extern function using a pointer to it. But everytime I try, I get compiler errors that the extern function is undeclared. I have little experience with external functions, and so cannot see my mistake. I have a function…

Scott
- 438
- 6
- 18
2
votes
2 answers
glGenFramebuffers, glBindFramebuffer etc undeclared
I'm trying to set up a frame buffer object but I am getting errors. glGenFramebuffers is always undeclared, as are other similar things like glBindFramebuffer.
I believe that the problem is import related, but am unsure how to go about fixing…

Adam Kenworthy
- 29
- 1
- 6
2
votes
1 answer
How can I fix "undeclared identifier" caused by mock object based on interface that uses a different unit
I am mocking an object supporting interface IClient for use in unit testing.
The interface itself is defined in another unit, ClientIF.
The interface references a TDetail defined in another unit, ldetail.
If I mock TDetail, I get an unidentified…

Doug Johnson-Cookloose
- 530
- 4
- 17
1
vote
3 answers
C++: 'set' and 'vector' "undeclared despite #include statements
I am using Netbeans 7.1 on Ubuntu 11.04.
The following call
set< Triangle > V;
gives the error message
error: ‘set’ was not declared in this scope
and the following call
vector< Triangle > ans;
gives the error message
error: ‘vector’ was not…

OtagoHarbour
- 3,969
- 6
- 43
- 81
1
vote
1 answer
iOS 5 undeclared identifier GL_TEXTURE_RECTANGLE
I'm having trouble using a rectangular texture on iOS (iPhone 3gs or newer)
I'm trying to use GL_TEXTURE_RECTANGLE and/or GL_EXT_texture_rectangle but XCODE autocomplete doesn't recognize it, i think because the proper header file is not imported…

OMRVKZ
- 11
- 2
1
vote
2 answers
c++ Undeclared identifier inside operator function
I'm creating a "date" class in c++, which holds day, month and year variables and bunch of operator functions to use it with.
I have a date.h header and date.cpp for my class and one of the operator functions in date.cpp is giving me bunch of…

Baburo
- 55
- 6
1
vote
1 answer
JavaScript Map or 2D Array for...of Variable Declarations or Lack Thereof
All the examples I find online for iterating over a Map using for...of are in this format:
for (const [key, val] of map)
console.log(`${key} maps to ${val}`);
What about using previously declared variables? As in:
let key, val;
for ([key, val]…

Sideways S
- 601
- 7
- 12
1
vote
0 answers
DECLARATIONERROR: UNDECLARED IDENTIFIER when I compile from Truffle
I am trying to create a Credist Score Function in a Loan Management Smart Contract using solidity, but I keep getting this undeclared identifier error when I compile on remix browser IDE and truffle. How can I solve this problem please?
I have…

Akinfenwa Damilare
- 11
- 1
1
vote
2 answers
declare element in array that is the struct type
I have this struct:
typedef struct {
int id;
node_t * otherNodes;
} node_t;
where I need an array of nodes in my node....
but in the header file is not recognized: it tell me `unknown type name 'node_t'
how can I solve this?
thanks

ghiboz
- 7,863
- 21
- 85
- 131