Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Visual Studio Question Pin
Steve Weeks4-Aug-06 17:35
Steve Weeks4-Aug-06 17:35 
QuestionVisual Studio 2003 Debugger and Execptions [modified] Pin
kpeng14-Aug-06 11:39
kpeng14-Aug-06 11:39 
AnswerRe: Visual Studio 2003 Debugger and Execptions [modified] Pin
kpeng18-Aug-06 12:41
kpeng18-Aug-06 12:41 
QuestionHow does AfxGetApp() work? Pin
Ali Tavakol4-Aug-06 11:28
Ali Tavakol4-Aug-06 11:28 
AnswerRe: How does AfxGetApp() work? Pin
PJ Arends4-Aug-06 16:39
professionalPJ Arends4-Aug-06 16:39 
AnswerRe: How does AfxGetApp() work? Pin
Joe Woodbury4-Aug-06 16:40
professionalJoe Woodbury4-Aug-06 16:40 
Question"hard-wired" in C++ Pin
Jay034-Aug-06 10:10
Jay034-Aug-06 10:10 
AnswerRe: "hard-wired" in C++ Pin
RChin4-Aug-06 11:14
RChin4-Aug-06 11:14 
This is probably referring to values being 'hard coded'.
So if you have explicitly defined a numeric or string in your code, then it is termed as being 'hard-coded'.
The flip side of this is to construct your coding so that your values are user-defined, or can be obtained from an external source.
#define PI 3.142
float calc(int a, int b)
{
  return (a * b * PI);
}
</code>

So in the above example, I have hard-coded the value of pi. In this case the accuracy of my calculations are fixed. If I needed to increase the accuracy of pi at a future date, I need to edit and recompile my code. This may not be a problem now, but can cause some problems in certain circumstances.

Hard coding string values are also widely mentioned and can be extremely difficult for multi-lingual software. In cases where your program messages, logs, reports and UI text may change (due to language changes for example), you do not want to hard-code text strings when writing your code. One way around this is to use the string resource files that de-couple this process.






I Dream of Absolute Zero

AnswerRe: "hard-wired" in C++ Pin
Ravi Bhavnani4-Aug-06 11:53
professionalRavi Bhavnani4-Aug-06 11:53 
AnswerRe: "hard-wired" in C++ Pin
Rilhas6-Aug-06 3:39
Rilhas6-Aug-06 3:39 
QuestionVisual Studio Net 2003 does not catch divide by zero with doubles Pin
kpeng14-Aug-06 6:45
kpeng14-Aug-06 6:45 
AnswerRe: Visual Studio Net 2003 does not catch divide by zero with doubles Pin
Zac Howland4-Aug-06 7:03
Zac Howland4-Aug-06 7:03 
AnswerRe: Visual Studio Net 2003 does not catch divide by zero with doubles Pin
Chris Losinger4-Aug-06 7:04
professionalChris Losinger4-Aug-06 7:04 
AnswerRe: Visual Studio Net 2003 does not catch divide by zero with doubles [modified] Pin
Sarath C4-Aug-06 7:09
Sarath C4-Aug-06 7:09 
AnswerRe: Visual Studio Net 2003 does not catch divide by zero with doubles Pin
David Crow4-Aug-06 7:50
David Crow4-Aug-06 7:50 
AnswerRe: Visual Studio Net 2003 does not catch divide by zero with doubles Pin
kpeng14-Aug-06 8:14
kpeng14-Aug-06 8:14 
GeneralRe: Visual Studio Net 2003 does not catch divide by zero with doubles Pin
Zac Howland4-Aug-06 8:36
Zac Howland4-Aug-06 8:36 
AnswerRe: Visual Studio Net 2003 does not catch divide by zero with doubles Pin
Joe Woodbury4-Aug-06 16:42
professionalJoe Woodbury4-Aug-06 16:42 
Questionbad pointer Pin
jon-804-Aug-06 6:15
professionaljon-804-Aug-06 6:15 
QuestionRe: bad pointer Pin
David Crow4-Aug-06 6:32
David Crow4-Aug-06 6:32 
AnswerRe: bad pointer Pin
jon-804-Aug-06 6:53
professionaljon-804-Aug-06 6:53 
GeneralRe: bad pointer Pin
David Crow4-Aug-06 7:16
David Crow4-Aug-06 7:16 
GeneralRe: bad pointer Pin
jon-804-Aug-06 9:34
professionaljon-804-Aug-06 9:34 
QuestionRe: bad pointer Pin
David Crow4-Aug-06 9:40
David Crow4-Aug-06 9:40 
AnswerRe: bad pointer [modified] Pin
Zac Howland4-Aug-06 6:57
Zac Howland4-Aug-06 6:57 

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.