473,395 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Help with "identifier not found" error.

Hi,

I have a function get_array_data in a visual C++ code which is defined here:
Expand|Select|Wrap|Line Numbers
  1. int CCleanViewDlg::get_array_data (float range_input, float sobp_input, float total, float delivered, int spread);
  2.  
and defined in the header file here:
Expand|Select|Wrap|Line Numbers
  1. int get_array_data(float range, float sobp, float total, float delivered, int spread);
  2.  
and called here:
Expand|Select|Wrap|Line Numbers
  1. int m_depth_bin = get_array_data(range, sobp, total_mu, delivered_mu, spread);
  2.  
and is giving the error " 'get_array_data': identifier not found" but I can't figure out why. Is there any other part of the code that might be relevant? Any suggestions would be greatly appreciated!

Thanks!
Jun 21 '10 #1
4 1839
donbock
2,426 Expert 2GB
Both of your first two code snippets look like function declarations (that is, function prototypes). The function definition has the body of the function enclosed in braces. Where is your function definition? Notice that the function definition never has a semicolon after the closing parenthesis while a function declaration always has a semicolon after the closing parenthesis.

This answer is accurate for C. Perhaps C++ does things differently.
Jun 21 '10 #2
Oops sorry I pasted that wrong, the function is defined as
Expand|Select|Wrap|Line Numbers
  1. int CCleanViewDlg::get_array_data (float range_input, float sobp_input, float total, float delivered, int spread){
  2. ...BLAH.... ;
  3. }
  4.  
Jun 21 '10 #3
donbock
2,426 Expert 2GB
Your function definition is prefaced by CCleanViewDlg:: but the declaration and invocation aren't. Might that be part of your problem?

Disclaimer: I'm an unrepentant C programmer. I'm only guessing at this C++ folderol.

By the way, is the header with the function declaration included by the source file with the function invocation?
Jun 21 '10 #4
weaknessforcats
9,208 Expert Mod 8TB
If your function is CCleanViewDlg::get_array_data, then you need a CCleanViewDlg object in order to call the function. You can't just call it by itself as in C.

Using a scope resolution operator (::) is how C++ lets you have multiple functions with the same name. You can have many get_array_data function as long as each one has a different named scope.
Jun 22 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
4
by: dlsan | last post by:
Hello to everybody. I'm working in Italy on this website http://www.fondazioneantonioruberti.it/ariene/ as css/xhtml/graphic designer in cooperation with a php programmer and a ISP provider....
4
by: amywolfie | last post by:
I would like to put code behind a Find button on a form which: 1) Performs a find based on a field on the form 2) If NO RECORDS ARE FOUND, then displays a custom "No Records Found" message box. ...
5
by: Richard Lionheart | last post by:
How do I make the changes to environment variables made by vsvars32.bat persistent? I have tried to build Microsoft.Web.UI.WebControls.dll in a effort to study some tutorials about web...
9
by: Martin Eyles | last post by:
Hi, I have set up an asp.net website on another PC in order to test it. The site was fine on my PC, but on the new PC all the pages give the error "The Page Cannot Be Found". Some legacy pages...
3
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these...
2
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these...
4
by: sid | last post by:
Can someone tell me how to detect "Action Cancelled" page with out polling. I have a frame set and I want to make sure the other frame is displaying what it is supposed to without polling. For...
1
by: ccon67 | last post by:
In a win32 project I have several compile errors for the resource *.rc. The first fews errors look like this error RC2144 : PRIMARY LANGUAGE ID not a number error RC2135 : file not found:...
1
by: wbosw | last post by:
I created the following Sub to fill a DataSet with the Table named Developer. It binds to the Grid with no problems. Public Sub SearchSkills() Dim sqlcmd3 As SqlCommand = New...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.