Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionComments needed: change from CSocket to raw socket Pin
includeh104-Nov-09 19:25
includeh104-Nov-09 19:25 
AnswerRe: Comments needed: change from CSocket to raw socket Pin
HimanshuJoshi4-Nov-09 20:03
HimanshuJoshi4-Nov-09 20:03 
AnswerRe: Comments needed: change from CSocket to raw socket Pin
CPallini4-Nov-09 21:22
mveCPallini4-Nov-09 21:22 
AnswerRe: Comments needed: change from CSocket to raw socket Pin
Richard MacCutchan4-Nov-09 23:01
mveRichard MacCutchan4-Nov-09 23:01 
AnswerRe: Comments needed: change from CSocket to raw socket Pin
Moak5-Nov-09 3:15
Moak5-Nov-09 3:15 
QuestionHow to set maximum length for EditControl (textBox) Pin
AliceYeap4-Nov-09 15:32
AliceYeap4-Nov-09 15:32 
AnswerRe: How to set maximum length for EditControl (textBox) Pin
«_Superman_»4-Nov-09 15:50
professional«_Superman_»4-Nov-09 15:50 
GeneralRe: How to set maximum length for EditControl (textBox) Pin
AliceYeap4-Nov-09 16:37
AliceYeap4-Nov-09 16:37 
QuestionRe: How to set maximum length for EditControl (textBox) Pin
David Crow4-Nov-09 17:16
David Crow4-Nov-09 17:16 
GeneralRe: How to set maximum length for EditControl (textBox) [modified] Pin
«_Superman_»4-Nov-09 18:27
professional«_Superman_»4-Nov-09 18:27 
GeneralRe: How to set maximum length for EditControl (textBox) Pin
David Crow5-Nov-09 3:53
David Crow5-Nov-09 3:53 
GeneralRe: How to set maximum length for EditControl (textBox) Pin
«_Superman_»5-Nov-09 5:38
professional«_Superman_»5-Nov-09 5:38 
GeneralRe: How to set maximum length for EditControl (textBox) Pin
David Crow5-Nov-09 6:30
David Crow5-Nov-09 6:30 
AnswerRe: How to set maximum length for EditControl (textBox) Pin
Adam Roderick J4-Nov-09 19:22
Adam Roderick J4-Nov-09 19:22 
AnswerRe: How to set maximum length for EditControl (textBox) Pin
AliceYeap4-Nov-09 20:13
AliceYeap4-Nov-09 20:13 
QuestionDirectShow VMR-9: renders only 50% of the time in fullscreen. how to fix? Pin
Satrugha4-Nov-09 13:38
Satrugha4-Nov-09 13:38 
Questionhow to declare a one based array ? Pin
timbk4-Nov-09 12:47
timbk4-Nov-09 12:47 
AnswerRe: how to declare a one based array ? Pin
Luc Pattyn4-Nov-09 13:25
sitebuilderLuc Pattyn4-Nov-09 13:25 
AnswerRe: how to declare a one based array ? [modified] Pin
CPallini4-Nov-09 13:35
mveCPallini4-Nov-09 13:35 
GeneralRe: how to declare a one based array ? Pin
timbk4-Nov-09 13:43
timbk4-Nov-09 13:43 
QuestionRe: how to declare a one based array ? Pin
CPallini4-Nov-09 13:49
mveCPallini4-Nov-09 13:49 
AnswerRe: how to declare a one based array ? Pin
timbk4-Nov-09 13:58
timbk4-Nov-09 13:58 
GeneralRe: how to declare a one based array ? Pin
CPallini4-Nov-09 20:54
mveCPallini4-Nov-09 20:54 
I'm sorry for you.

C/C++ arrays are zero based.
While there's nothing wrong in liking better one-based arrays, it is wiser remaining stuck with zero-based ones, because:
  • You need extra work to make your arrays alive (extra work is generally bad)
  • Most people use the opposite convention: that means you have to adapt your data to any time you've to deal with other people code, like libraries, etc..

Neverthless, there are few examples of consistently used one-based arrays, for instance, all "Numerical Recipes" book source code uses it (the authors simply ignore array item 0).
Like all 'alien' conventions it's a bit difficult to grasp immediately, but after some experience with, becomes 'natural'.

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

AnswerRe: how to declare a one based array ? Pin
Tim Craig4-Nov-09 13:43
Tim Craig4-Nov-09 13:43 
GeneralRe: how to declare a one based array ? Pin
timbk4-Nov-09 13:52
timbk4-Nov-09 13:52 

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.