473,395 Members | 1,701 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.

Visual C++ 6.0 Runtime Error

The following code doesn't appear to run correctly compiled with Visual
C++ 6.0. I haven't gotten a chance to try this in GCC yet. "A" is
never output, not even on the first iteration. I have heard of
something called a stacking error, could someone please explain this to
me?

while(infile>>c){
cout << "A";
while(flag){
cout << "B";
if(isalpha(c)){
total++;
} else {
flag=false;
}
}
words++;
flag=true;
}

Nov 13 '06 #1
2 1829
DragónChristiano wrote:
The following code doesn't appear to run correctly compiled with
Visual C++ 6.0.
Your post falls under FAQ 5.8.
I haven't gotten a chance to try this in GCC yet.
"A" is never output, not even on the first iteration. I have heard of
something called a stacking error, could someone please explain this
to me?
I don't know what that is, sorry.

Have you tried debugging (stepping through) your program?
>
while(infile>>c){
cout << "A";
Try adding a nudge:

cout << "A" << flush;
while(flag){
BTW, what's the value of 'flag' the first time around?
cout << "B";
Maybe even add 'flush' here too.
if(isalpha(c)){
total++;
} else {
flag=false;
}
}
words++;
flag=true;
}
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Nov 13 '06 #2
DragónChristiano <bj*******@gmail.comwrote:
The following code doesn't appear to run correctly compiled with Visual
C++ 6.0. I haven't gotten a chance to try this in GCC yet. "A" is
never output, not even on the first iteration. I have heard of
something called a stacking error, could someone please explain this to
me?

while(infile>>c){
cout << "A";
while(flag){
cout << "B";
if(isalpha(c)){
total++;
} else {
flag=false;
}
}
words++;
flag=true;
}
I don't know what you mean by "stacking error", but please see the
following FAQ:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.8

--
Marcus Kwok
Replace 'invalid' with 'net' to reply
Nov 13 '06 #3

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

Similar topics

1
by: angelag | last post by:
I am currently taking a college course in Visual Basic.Net and I am a beginner. I bought Visual Studio.Net 2003 to do my homework at home. I built my first project and e-mailed it to myself at...
6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
3
by: Rao Kachibhotla | last post by:
Hi, I have a Deskband project that builds a DLL. When I register the DLL, I get the usual success dialog, but i also get "Visual C++ RunTime error" that says "This application has requested the...
7
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
1
by: Robert | last post by:
Im using Windows XP Pro, SP2 (error was still with SP1), P4 3.4Ghz, 1Gb Ram, NVidia FX1100 Graphics, Using Programs such as Autodesk Inventor & AutoCAD. I don't have a clue what Microsoft Visual is...
4
by: ffhansix | last post by:
Hi, I am trying to reference a COM component (.dll) from Visual Studio 2005 in my windows application in C# by adding a reference to a third party.dll file (tried .type library also), and i get...
8
by: chessog1 | last post by:
Hey, I was just wondering if someone here could please do me the honor of helping me with this problem im having. I've been researching this for a week now and to of no avail, so im hoping someone...
0
by: rajkalacbe | last post by:
I am running a visual basic executable program through Forms4.5 of D2K using Forms menu options.. When I Invoke this form in the server where I have the database installed, I do not have any...
3
PieCook
by: PieCook | last post by:
Error message: "The application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem." Basically, I recently purchased a game programming...
2
by: blogman | last post by:
I am getting a Visual studio 2008 IDE application R6034 runtime error. This means that the IDE application is raising the error not the application I am building. This means that Microsoft did not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
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
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
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.