473,504 Members | 13,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

about vector

Hi everybody,
I have a program which use <vector>. When I compile the program the vc.net
2003 compiler always complains that:

.......
Compiling resources...
Linking...
Generating code
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(834) :
warning C4702: unreachable code
c:\program files\microsoft visual studio .net 2003\vc7\include\vector(856) :
warning C4702: unreachable code
Finished generating code

Does anyone know what's wrong. and how could i deal with it. I like to set
the compile warning level to be 4 so that I could watch all that happened.

Nov 17 '05 #1
1 1138
mestupid wrote:
Hi everybody,
I have a program which use <vector>. When I compile the program the
vc.net 2003 compiler always complains that:

......
Compiling resources...
Linking...
Generating code
c:\program files\microsoft visual studio .net
2003\vc7\include\vector(834) : warning C4702: unreachable code
c:\program files\microsoft visual studio .net
2003\vc7\include\vector(856) : warning C4702: unreachable code
Finished generating code

Does anyone know what's wrong. and how could i deal with it. I like
to set the compile warning level to be 4 so that I could watch all
that happened.


There's no guarantee that the STL headers compile clean at /W4. In this
case, there's code that's not reachable - presumably it'd be reachable if
you instantiated the vector on some other type.

-cd
Nov 17 '05 #2

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

Similar topics

35
4499
by: wired | last post by:
Hi, I've just taught myself C++, so I haven't learnt much about style or the like from any single source, and I'm quite styleless as a result. But at the same time, I really want nice code and I...
15
6555
by: JustSomeGuy | last post by:
I have a need to make an applicaiton that uses a variable number of nested for loops. for now I'm using a fixed number: for (z=0; z < Z; ++z) for (y=0; y < Y; ++y) for (x=0; x < X; ++x)
4
3058
by: Tran Tuan Anh | last post by:
Dear all, I am new in C++, and now get confused about a lot of things. I wrote this simple code to test the vector. class Temp { public: int x; }; int main() { vector<Temp> v;
18
412
by: Juha Kettunen | last post by:
Hi I don't know if I am using right words (bit-number), but this is what I mean: You can set a 64 bit number: unsigned long a; Now you can use binary operators to manipulate variable a...
9
2296
by: kathy | last post by:
I am using std::vector in my program: func() { std::vector <CMyClass *> vpMyClass; vpMyClass.push_back(new CMyClass()); vpMyClass.push_back(new CMyClass()); vpMyClass.push_back(new...
8
1634
by: Tom | last post by:
I was reading Bjourne's book and wonder about constructors? If I have a class template<class T> class Vector { public: explicit Vector(size_t n); } Does a default constructor get...
4
3494
by: Josefo | last post by:
Hello, is someone so kind to tell me why I am getting the following errors ? vector_static_function.c:20: error: expected constructor, destructor, or type conversion before '.' token...
7
5746
by: Renzr | last post by:
I have a problem about the std::set<>iterator. After finding a term in the std::set<>, i want to know the distance from the current term to the begin(). But i have got a error. Please offer me...
7
3779
by: Markus Pitha | last post by:
Hello again, I have another question about the handling of multidimensional vectors. Actually, it's not difficult when the size is known at the beginning, but I still wasn't able to create...
6
1802
by: remlostime | last post by:
now, i write some code code1: int a; int main(){} code2: vector<inta(10000000); int main(){} after using g++ compile, and run it, code1 is broken, but code2 runs
0
7213
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
7098
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
7298
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
7471
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...
0
5610
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
5026
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
3187
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
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.