Click here to Skip to main content
15,886,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer10-Oct-16 4:32
leon de boer10-Oct-16 4:32 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_10-Oct-16 13:20
Vaclav_10-Oct-16 13:20 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer10-Oct-16 17:02
leon de boer10-Oct-16 17:02 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_11-Oct-16 7:01
Vaclav_11-Oct-16 7:01 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer11-Oct-16 17:26
leon de boer11-Oct-16 17:26 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
Vaclav_12-Oct-16 14:42
Vaclav_12-Oct-16 14:42 
GeneralRe: One more error using function pointers - void value not ignored as it ought to be Pin
leon de boer12-Oct-16 17:09
leon de boer12-Oct-16 17:09 
QuestionMore basic C++ questions - may I ask? Pin
Vaclav_8-Oct-16 15:24
Vaclav_8-Oct-16 15:24 
I am still not too comfortable with passing variables to
constructor, but eventually I'll get over it.

But this got me stumped - never heard of having const used this way. Why?
So how do you read this -X(x) with relation to following function double x()?

Please if this is too basic for you just let someone else answer, OK?
I am asking for help and have no intent to waste your time on trivia.
Thanks

class Point2d{
public:
Point2d() {}
Point2d(double x, double y)
: X(x), Y(y) {}

double x() const { return X; }
double y() const { return Y; }

/**
* Returns the norm of this vector.
* <a href="http://www.codeproject.com/Members/return">@return</a> the norm
*/
double norm() const {
return sqrt( X * X + Y * Y );
}

void setCoords(double x, double y) {
X = x; Y = y;
}
AnswerRe: More basic C++ questions - may I ask? Pin
Midi_Mick8-Oct-16 15:52
professionalMidi_Mick8-Oct-16 15:52 
AnswerRe: More basic C++ questions - may I ask? Pin
Richard MacCutchan8-Oct-16 20:37
mveRichard MacCutchan8-Oct-16 20:37 
GeneralRe: More basic C++ questions - may I ask? Pin
Vaclav_9-Oct-16 6:20
Vaclav_9-Oct-16 6:20 
GeneralRe: More basic C++ questions - may I ask? Pin
Richard MacCutchan9-Oct-16 6:27
mveRichard MacCutchan9-Oct-16 6:27 
GeneralRe: More basic C++ questions - may I ask? Pin
Graham Breach9-Oct-16 21:46
Graham Breach9-Oct-16 21:46 
GeneralRe: More basic C++ questions - may I ask? Pin
Richard MacCutchan9-Oct-16 23:00
mveRichard MacCutchan9-Oct-16 23:00 
AnswerRe: More basic C++ questions - may I ask? Pin
Ratul Thakur10-Oct-16 21:42
Ratul Thakur10-Oct-16 21:42 
GeneralRe: More basic C++ questions - may I ask? Pin
David Crow11-Oct-16 6:23
David Crow11-Oct-16 6:23 
QuestionHow to initialize a CString array in MSVS C++ 2015 Pin
Member 94114717-Oct-16 8:36
Member 94114717-Oct-16 8:36 
AnswerRe: How to initialize a CString array in MSVS C++ 2015 Pin
jeron17-Oct-16 10:15
jeron17-Oct-16 10:15 
GeneralRe: How to initialize a CString array in MSVS C++ 2015 Pin
Member 941147111-Oct-16 8:48
Member 941147111-Oct-16 8:48 
GeneralRe: How to initialize a CString array in MSVS C++ 2015 Pin
Victor Nijegorodov12-Oct-16 2:57
Victor Nijegorodov12-Oct-16 2:57 
AnswerRe: How to initialize a CString array in MSVS C++ 2015 Pin
Chris Losinger8-Oct-16 6:58
professionalChris Losinger8-Oct-16 6:58 
QuestionUsing / accessing function pointer declaration externally Pin
Vaclav_6-Oct-16 11:05
Vaclav_6-Oct-16 11:05 
AnswerRe: Using / accessing function pointer declaration externally Pin
CPallini7-Oct-16 0:43
mveCPallini7-Oct-16 0:43 
GeneralRe: Using / accessing function pointer declaration externally Pin
Vaclav_7-Oct-16 17:39
Vaclav_7-Oct-16 17:39 
GeneralRe: Using / accessing function pointer declaration externally Pin
CPallini8-Oct-16 3:16
mveCPallini8-Oct-16 3:16 

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.