473,407 Members | 2,326 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,407 software developers and data experts.

Fail to Compile vc6

class A{
private:
int a;
public:
A(){a=0;}

int geta(){return a;} //error
};
typedef GENES G;

-------Error---------
------<(*.*E)>-------

error C2629: unexpected 'int ('
error C2334: unexpected token(s) preceding ':'; skipping apparent
function body
error C2143: syntax error : missing ')' before '}'
........
---------------------
Sep 8 '06 #1
3 2363
Andy McNamara wrote:
class A{
private:
int a;
public:
A(){a=0;}

int geta(){return a;} //error
};
typedef GENES G;

-------Error---------
------<(*.*E)>-------

error C2629: unexpected 'int ('
Looks OK to me. Well, the code does, VC6 is obsolete.
If you had read the FAQ, you would have known to post the smallest bit
of complete code that shows the problem. In this fragment we can't find
the cause of any of those errors. I don't see the line with "int ("

Regards,
Michiel Salters

Sep 8 '06 #2

Andy McNamara wrote:
class A{
private:
int a;
public:
A(){a=0;}

int geta(){return a;} //error
};
typedef GENES G;

-------Error---------
------<(*.*E)>-------

error C2629: unexpected 'int ('
error C2334: unexpected token(s) preceding ':'; skipping apparent
function body
error C2143: syntax error : missing ')' before '}'
.......
---------------------
The problem must be in code that you didn't post. The following
compiles on my system...

class A{
private:
int a;
public:
A(){a=0;}

int geta(){return a;} //error
};

int main()
{
return 0;
}

Sep 8 '06 #3
Andy McNamara wrote:
class A{
private:
int a;
public:
A(){a=0;}

int geta(){return a;} //error
};
typedef GENES G;

-------Error---------
------<(*.*E)>-------

error C2629: unexpected 'int ('
error C2334: unexpected token(s) preceding ':'; skipping apparent
function body
error C2143: syntax error : missing ')' before '}'
.......
---------------------
fails with g++ too:
9: error: 'GENES' does not name a type

Best

Kai-Uwe Bux
Sep 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jussi Mononen | last post by:
Hi, I'm having problems to successfully execute the test scripts on a Compaq host ( OSF1 tr51bdev V5.1 2650 alpha ). Almost all tests end up with the following error message "PARI: *** ...
2
by: David | last post by:
Assuming of course that the instantiation statement is 100% ok. As a matter of fact, that very instantiation passes successfuly on VC++ 7.1 (and Borland) but since I was suspicious that it was OK...
10
by: A Moore | last post by:
/// /// Both g++ 3.4.1 and comeau 4.3.3 report "i undefined" /// #include <iostream> template<typename T> class Base { protected: int i;
27
by: Chess Saurus | last post by:
I'm getting a little bit tired of writing if (a = malloc(...) == NULL) { // error code } I mean, is it really possible that a malloc call could fail, except in the case of running out of...
8
by: Boris | last post by:
Hi folks! Look at the code: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data;
1
by: Chua Wen Ching | last post by:
Okay i manage to convert the C# class library into dll, and enable com interop. I basically can call c# methods from vb6 with this as long i add references to the .net project (e.g TestProject) ...
2
by: John Cullen | last post by:
I have uncovered an interesting problem with resource only DLLs. If I create a project with a long name and the name includes periods ("."), the IDE will fail to kick off the linker. The resource...
5
by: MLH | last post by:
A97 aborts creation of MDE reporting that there's a compile error in one form. Sure enough, if I remove the form from the source database and attempt to compile the MDE, it succeeds. But when I...
5
by: FBergemann | last post by:
I use SunOS 5.8, gcc 3.3.2, boost 1.33.1. I have build the entire boost package and try to compile a simple example: #include <iostream> #include <string> #include <boost/regex.hpp //...
31
by: banansol | last post by:
Hi, I just want to get this right. A call to realloc() will return NULL on error and the original memory is left untouched, both when requesting a larger or a smaller size that the original,...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.