Click here to Skip to main content
15,919,479 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to view anonymous namespace variables' values in debugger? Pin
Christian Graus4-Nov-02 12:35
protectorChristian Graus4-Nov-02 12:35 
AnswerRe: How to view anonymous namespace variables' values in debugger? Pin
jbarton5-Nov-02 5:04
jbarton5-Nov-02 5:04 
GeneralRe: How to view anonymous namespace variables' values in debugger? Pin
Tim Finer5-Nov-02 7:08
Tim Finer5-Nov-02 7:08 
AnswerRe: How to view anonymous namespace variables' values in debugger? Pin
dshatilov15-Sep-16 0:29
dshatilov15-Sep-16 0:29 
GeneralRe: How to view anonymous namespace variables' values in debugger? Pin
Richard Deeming15-Sep-16 7:10
mveRichard Deeming15-Sep-16 7:10 
GeneralRe: How to view anonymous namespace variables' values in debugger? Pin
dshatilov15-Sep-16 7:56
dshatilov15-Sep-16 7:56 
GeneralPlease Help!! Pin
Autunmsky4-Nov-02 11:38
Autunmsky4-Nov-02 11:38 
GeneralRe: Please Help!! Pin
Christian Graus4-Nov-02 11:50
protectorChristian Graus4-Nov-02 11:50 
In order to make your include files visible, you need to check the 'display message as is' checkbox under the message as you type it.

Your problem is that your if/else statements are not scoped.

If I were to run this:

int i = 1;

if (i==0)
cout << "it's zero ";
cout << "I wish it was one ";

cout << "it's one";

the result will be

"I wish it was one it's one".

Python scopes things in blocks, C++ does it with the curly brackets. Unless you do this:

int i = 1;

if (i==0)
{
cout << "it's zero ";
cout << "I wish it was one ";
}

cout << "it's one";

the language will automatically only make the first line after the if statement conditional on the statement above it.

In this case, it's kind of pointless making the type a variable and then outputting the type directly, you should instead just print the value in the variable after deciding what sort of triangle it is.


Christian

No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002

Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002

During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
GeneralRe: Please Help!! Pin
Gary Kirkham4-Nov-02 11:48
Gary Kirkham4-Nov-02 11:48 
GeneralRe: Please Help!! Pin
Autunmsky4-Nov-02 11:55
Autunmsky4-Nov-02 11:55 
GeneralRe: Please Help!! Pin
Christian Graus4-Nov-02 12:22
protectorChristian Graus4-Nov-02 12:22 
GeneralRe: Please Help!! Pin
Chris Losinger4-Nov-02 12:23
professionalChris Losinger4-Nov-02 12:23 
GeneralRe: Please Help!! Pin
Christian Graus4-Nov-02 12:33
protectorChristian Graus4-Nov-02 12:33 
GeneralRe: Please Help!! Pin
Chris Losinger4-Nov-02 15:01
professionalChris Losinger4-Nov-02 15:01 
GeneralRe: Please Help!! Pin
Christian Graus4-Nov-02 15:17
protectorChristian Graus4-Nov-02 15:17 
GeneralRe: Please Help!! Pin
Chris Losinger4-Nov-02 17:29
professionalChris Losinger4-Nov-02 17:29 
GeneralRe: Please Help!! Pin
Autunmsky4-Nov-02 12:57
Autunmsky4-Nov-02 12:57 
GeneralRe: Please Help!! Pin
Christian Graus4-Nov-02 13:12
protectorChristian Graus4-Nov-02 13:12 
GeneralRe: Please Help!! Pin
Autunmsky4-Nov-02 14:29
Autunmsky4-Nov-02 14:29 
GeneralHelp with Dialog Toolbars Pin
Steven M Hunt4-Nov-02 10:33
Steven M Hunt4-Nov-02 10:33 
GeneralRe: Help with Dialog Toolbars Pin
dabs4-Nov-02 10:50
dabs4-Nov-02 10:50 
GeneralCMenu question. Pin
Anonymous4-Nov-02 10:11
Anonymous4-Nov-02 10:11 
QuestionHow do i at runtime, draw a bitmap in my application? Pin
Anonymous4-Nov-02 9:45
Anonymous4-Nov-02 9:45 
AnswerRe: How do i at runtime, draw a bitmap in my application? Pin
Christian Graus4-Nov-02 9:56
protectorChristian Graus4-Nov-02 9:56 
Generalyes Pin
Anonymous4-Nov-02 10:31
Anonymous4-Nov-02 10:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.