Click here to Skip to main content
15,904,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question#define question Pin
_Flaviu7-Apr-12 0:36
_Flaviu7-Apr-12 0:36 
AnswerRe: #define question Pin
Richard MacCutchan7-Apr-12 1:36
mveRichard MacCutchan7-Apr-12 1:36 
AnswerRe: #define question Pin
Randor 7-Apr-12 6:51
professional Randor 7-Apr-12 6:51 
GeneralRe: #define question Pin
_Flaviu7-Apr-12 9:14
_Flaviu7-Apr-12 9:14 
GeneralRe: #define question Pin
Randor 7-Apr-12 19:25
professional Randor 7-Apr-12 19:25 
Questionline algorithm in borland c++ Pin
matarz6-Apr-12 13:31
matarz6-Apr-12 13:31 
AnswerRe: line algorithm in borland c++ Pin
David Crow6-Apr-12 15:31
David Crow6-Apr-12 15:31 
AnswerRe: line algorithm in borland c++ Pin
Luc Pattyn6-Apr-12 16:12
sitebuilderLuc Pattyn6-Apr-12 16:12 
193344 wrote:
y=( (y2-y1)/(x2-x1) ) * incx+y1;

this line will always be executed at least once, as it sits inside a do-while loop, without any precondition. And for vertical lines, x1 equals x2, so the division will fail.

Your code isn't very well structured; what you should do is provide a general line drawing implementation, and one (or more) specialized ones; then have conditional tests organized such that exactly one implementation gets executed, depending on the input values.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

Questionread/writing Linked List to a random access file in c++ Pin
djgmad6-Apr-12 12:47
djgmad6-Apr-12 12:47 
AnswerRe: read/writing Linked List to a random access file in c++ Pin
David Crow6-Apr-12 15:34
David Crow6-Apr-12 15:34 
GeneralRe: read/writing Linked List to a random access file in c++ Pin
djgmad8-Apr-12 3:04
djgmad8-Apr-12 3:04 
GeneralRe: read/writing Linked List to a random access file in c++ Pin
David Crow8-Apr-12 16:28
David Crow8-Apr-12 16:28 
AnswerRe: read/writing Linked List to a random access file in c++ Pin
Richard MacCutchan6-Apr-12 22:01
mveRichard MacCutchan6-Apr-12 22:01 
GeneralRe: read/writing Linked List to a random access file in c++ Pin
djgmad8-Apr-12 3:09
djgmad8-Apr-12 3:09 
GeneralRe: read/writing Linked List to a random access file in c++ Pin
Richard MacCutchan8-Apr-12 6:01
mveRichard MacCutchan8-Apr-12 6:01 
Questionmenubar icons (win32) Pin
sadas232341s6-Apr-12 6:45
sadas232341s6-Apr-12 6:45 
SuggestionRe: menubar icons (win32) Pin
David Crow6-Apr-12 10:32
David Crow6-Apr-12 10:32 
Questionwriting a wave file to currecnt directory from buffer Pin
Member 87012356-Apr-12 4:32
Member 87012356-Apr-12 4:32 
AnswerRe: writing a wave file to currecnt directory from buffer Pin
David Crow6-Apr-12 4:37
David Crow6-Apr-12 4:37 
GeneralRe: writing a wave file to currecnt directory from buffer Pin
Member 87012358-Apr-12 21:11
Member 87012358-Apr-12 21:11 
QuestionLoad image from Open Dialog Pin
sadas232341s6-Apr-12 3:36
sadas232341s6-Apr-12 3:36 
QuestionRe: Load image from Open Dialog Pin
David Crow6-Apr-12 3:53
David Crow6-Apr-12 3:53 
QuestionDate Time Picker Strange Behavior in Windows 7 Pin
softwaremonkey5-Apr-12 20:57
softwaremonkey5-Apr-12 20:57 
GeneralRe: Date Time Picker Strange Behavior in Windows 7 Pin
David Crow6-Apr-12 2:41
David Crow6-Apr-12 2:41 
QuestionUnable To Tackle MoveWindow() Pin
AmbiguousName5-Apr-12 19:51
AmbiguousName5-Apr-12 19:51 

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.