473,587 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compilation errors

class Party{
public:
double averageNames(in t n, int personA[], int personB[]){
vector<set<int> > personsKnown;
//vector< set<int> > personsKnown;
}
};

int main(){
Party p;
return 0;
}
can anybody plz explain me why the code dosn't compile on msvc6 wheere
as the line that is commented compiles perfectly.note the only
difference between the two is of the spaces
around <>.
thanks
rt

Nov 17 '05 #1
2 809
ra************@ gmail.com wrote:
class Party{
public:
double averageNames(in t n, int personA[], int personB[]){
vector<set<int> > personsKnown;
//vector< set<int> > personsKnown;
}
};

int main(){
Party p;
return 0;
}
can anybody plz explain me why the code dosn't compile on msvc6
wheere as the line that is commented compiles perfectly.note the only
difference between the two is of the spaces
around <>.


Because that's the way the C++ standard says it's supposed to work. When you
have nested template-id's, you have to put whitespace between the closing >
in order to have it parse correctly, Without the space, it parses as a
right-shift operator.

The C++ committee has proposed changing the parsing rules to allow
constructs such as the above to compile without the whitespace, but that
recommendation is not part of any standard yet. Nonetheless, VC++ 8.0 (VS
2005) in fact implements the new rule and would compile your code as
originally written.

-cd
Nov 17 '05 #2
thanks a lot carl !!!

Nov 17 '05 #3

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

Similar topics

2
2581
by: FireStarter | last post by:
Guys, in the code that follows, why does the method F() still compile, even if DBG is undefined? Inside method G(), the code inside <#if DBG> does not compile (notice that I can write whatever I want in there, I will not receive a compilation error). I do get such an error in F() - because of the garbage I intentionally put there - but F()...
2
2819
by: Tommy Vercetti | last post by:
In Visual Studio .NET 2003, I do the following 1) File->New->Project 2) Visual C++ Projects->.NET->Windows Forms Application 3) Project->Add New Item->C++ File 4) Clear the new C++ file and replace with the two lines: #include "stdafx.h" #include <vcclr.h> 5) Build->Build Solution I get the following compilation errors:
2
6926
by: Kevin R. | last post by:
I have been ignoring this problem for a few weeks now, but it's becoming a bit annoying not to mention unproductive. Here it goes: I compile my project with no errors. Then after I debug/run it, I get the runtime error noted at the end of this message. If I re-compile (without any changes) and re-run, then my project will run OK. This...
2
1524
by: Steve | last post by:
Hi I'm receiving the following error whenever a new build is placed onto our production server: Timed out waiting for a program to execute. The command being executed was "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe" @"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\f315a746\1e2bd43d\famzuazo.cmdline".
0
1186
by: Mythran | last post by:
I'm have 2 primary errors that seem to occur. 1.) In my ASP.Net application, I have 3 libraries (BLL, DAL, and Schema) that are used for the 4th and 5th UI libraries. All of the dependant libraries (the first 3) are required for COM+ and therefore also require to be given a strong-name. So we have. After reading on the MSDN site about how...
6
9788
by: alban | last post by:
Hello I have got some problems of compilation on a AIX IBM, I use the XLC compilator (And I can't install another one). I try to compile code Pro*c ".pc" (oracle), I need do a pre-compilation after the pre-compilation with the my makefile I get the files ".c" After this a get also the objects files ".o", but no linkage ! and I can't have...
3
3391
by: seema | last post by:
Hi all, I am new to C programming. I have problem compiling a sample , #include <stdio.h> int getuniqueaddress1(){ return 1; } int getuniqueaddress2(){ return 2;
1
2571
by: J.A. | last post by:
Hi, I'm trying to use the CSharpCompilerProvider to dynamically compile some code. The test console app works fine but I get this error when using the same code in an ASP.NET app: error CS1619: Cannot create temporary file 'c:\WINDOWS\system32\CSCCB.tmp' -- Access is denied. I attached the code I use to compile the dynamic code at the...
35
3010
by: mwelsh1118 | last post by:
Why doesn't C# allow incremental compilation like Java? Specifically, in Java I can compile single .java files in isolation. The resulting individual .class files can be grouped into .jar files. In C#, there appears to be no analog. I have to compile all my .cs files into a single .dll. This has serious drawbacks in terms of...
1
2802
by: BSand0764 | last post by:
I'm getting an error that I can't seem to resolve. When I compile the Functor related logic in a test program, the files compile and execute properly (see Listing #1). However, when I incorporate the same logic within my simulation, the class that implements the functor logic has problems compiling. I get the following errors: --...
0
7920
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8215
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8347
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1189
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.