473,480 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error: local function definitions are illegal!

12 New Member
Hi ppl can anyone tell me what this error means?
error C2601: 'meanData' : local function definitions are illegal
Feb 6 '07 #1
1 4682
horace1
1,510 Recognized Expert Top Contributor
Hi ppl can anyone tell me what this error means?
error C2601: 'meanData' : local function definitions are illegal
it happens when you try to define a function within a function, see
http://msdn2.microsoft.com/en-us/library/sba3hty9.aspx

e.g. I try to define function meandata() within function fg1()
Expand|Select|Wrap|Line Numbers
  1. int fg1()
  2. {
  3.      int meanData() { return 1; }
  4.      int j=meanData();
  5.      return j;
  6. }
when I compile it using Visual C I get the error message
m.cpp(5) : error C2601: 'meanData' : local function definitions are illegal

define it outside fg1()
Expand|Select|Wrap|Line Numbers
  1. int meanData() { return 1; }
  2.  
  3. int fg1()
  4. {
  5.      int j=meanData();
  6.      return j;
  7. }
  8.  
Feb 6 '07 #2

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

Similar topics

0
2823
by: Putz Ronald | last post by:
Hy! I am trying to convert a win Oracle application to solaris! We have use external c functions which I have ibncluded in a shared object. See the makefile below: OBJECTS = definitions.o...
0
23435
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
15
25695
by: unknownbomb | last post by:
Hey all i really hope you can help me out. Im compiling a project and im getting 2 errors which are saying local function definitions are illegal. Anyone know what this mean? And especially...
3
3261
by: Mikail Dellovich | last post by:
I am on a Solaris 10 6/06 SPARC machine. I tried to compile sound player app for Asterisk and got the following error: Can someone provide an explanation or work around? Thanks! ...
2
1952
by: GC2006 | last post by:
//Error 1 error C2601: 'computeBestHotelBestMonth' : local function definitions are illegal e:\project 3\prj 3b.cpp 90 //Error 2 fatal error C1075: end of file found before the left brace '{' at...
9
2929
by: i | last post by:
#include<stdio.h> #include<conio.h> #include<process.h> #include<string.h> char ch; int n,m; void main(); char check(int,int,char); void cash(int,int,char); void debit_card(int,int,char);
4
3728
by: Chronictank | last post by:
Hi, as a bit of background (and seeing as it is my first post :)) i am a complete newbie at perl. I literally picked it up a week ago to do this project as it seemed like the best choice for a...
13
379
by: JOYCE | last post by:
Please help me,I don't know where the error is.The following is my programming. #include<stdio.h> #define SIZE 99 void mean (const int answer); void median(int answer); void mode(int...
3
2220
by: charmeda103 | last post by:
I keep getting errors and i looked relooked I cant seem to see what wrong. from my code can see u where the errors are coming from. here are the error messages: 1.warning C4101: 'size' :...
0
6920
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
7061
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
5367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4503
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3015
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
574
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
210
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.