|
From: Kenneth P. R. <kpr...@op...> - 2004-01-23 06:00:36
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<small><font face="Helvetica, Arial, sans-serif">I finally decided to
teach myself C++ from "Core C++: A Software Engineering Approach"
(2000) by Victor Shtern, "Rescued by C++" 3rd Ed. by Kris Jamsa (which
was a Borland Turbo C++ Lite book, and now mostly rely on C/C++
Programmer's Reference 2nd Ed. by Herbert Schildt. And, I finally had
a real-world application to write a program. Here's the code excerpt
that has me baffled.<br>
<br>
for (y=1; y<=i; y++);<br>
if (Groupset[y].substr(0,3) == Day1.substr)x*3-3,3))<br>
{<br>
TotDay[x-1]++;<br>
while (MtgCode0 == "P") MtgType=10;<br>
while (MtgCode0 == "L") MtgType=11;<br>
while (MtgCode0 == "W") MtgType=12;<br>
<br>
switch (MtgType)<br>
{<br>
case '10': TotP++; break;<br>
case '11': TotL++; break;<br>
case '12': TotW++; break;<br>
default: TotOther++;<br>
} // terminates Switch<br>
<br>
} // terminates if<br>
}; // terminates for<br>
<br>
Up to this point, the program runs fine, but it hangs when it hits
"while (MtgCode0 == "W") MtgType=12. In Debug, I set this line and the
"switch (MtgType) line as checkpoints. When the "while" stmt is
encountered, it turns blue in Debug, and will not go past this point.
Debug will not continue; the cursor stays on this line. Note that the
Debug screen is not frozen -- I can still set checkpoints, move the
cursor, etc. But it will not continue after this point.<br>
<br>
What's going on here?<br>
<br>
Thx, Ken<br>
</font></small>
</body>
</html>
|