Click here to Skip to main content
15,905,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Read buffer into a string. Pin
CPallini27-Jan-08 23:38
mveCPallini27-Jan-08 23:38 
GeneralRe: Read buffer into a string. Pin
CodingLover27-Jan-08 23:52
CodingLover27-Jan-08 23:52 
GeneralRe: Read buffer into a string. Pin
CPallini28-Jan-08 0:17
mveCPallini28-Jan-08 0:17 
GeneralRe: Read buffer into a string. Pin
CodingLover28-Jan-08 0:20
CodingLover28-Jan-08 0:20 
QuestionRe: Read buffer into a string. Pin
CodingLover28-Jan-08 16:31
CodingLover28-Jan-08 16:31 
GeneralRe: Read buffer into a string. Pin
CPallini28-Jan-08 21:21
mveCPallini28-Jan-08 21:21 
GeneralRe: Read buffer into a string. Pin
CodingLover28-Jan-08 22:17
CodingLover28-Jan-08 22:17 
GeneralRe: Read buffer into a string. Pin
CPallini28-Jan-08 22:46
mveCPallini28-Jan-08 22:46 
Eranga Thennakoon wrote:
Ok, thanks a lot pal. Now I got the point. At the same time. One of friend says that, as a good practice in programming, as much as possible it is better to avoid global variables and used member variables. Is that true?


Well, I'm not dogmatic about, but yes, I suggest you to use sparingly global variables.


Eranga Thennakoon wrote:
Why I'm asking is, one is that I'm really new for C++, two is I most familiar with Java and there is no such a way, so that those tips can be really helpful to me


Well if you're familiar with Java then you should be familiar with OOP principles too, such encapsulation and information hiding that both go against global variables usage.

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.

[my articles]


GeneralRe: Read buffer into a string. Pin
CodingLover29-Jan-08 0:13
CodingLover29-Jan-08 0:13 
Generalexception and global variable Pin
George_George27-Jan-08 22:34
George_George27-Jan-08 22:34 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 22:47
Maxwell Chen27-Jan-08 22:47 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:08
George_George27-Jan-08 23:08 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:02
Maxwell Chen27-Jan-08 23:02 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:08
George_George27-Jan-08 23:08 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:11
Maxwell Chen27-Jan-08 23:11 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:15
Maxwell Chen27-Jan-08 23:15 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:42
George_George27-Jan-08 23:42 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:45
Maxwell Chen27-Jan-08 23:45 
GeneralRe: exception and global variable Pin
George_George28-Jan-08 0:06
George_George28-Jan-08 0:06 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:16
George_George27-Jan-08 23:16 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:19
Maxwell Chen27-Jan-08 23:19 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:31
George_George27-Jan-08 23:31 
GeneralRe: exception and global variable Pin
Maxwell Chen27-Jan-08 23:34
Maxwell Chen27-Jan-08 23:34 
GeneralRe: exception and global variable Pin
George_George27-Jan-08 23:40
George_George27-Jan-08 23:40 
GeneralRe: exception and global variable Pin
CPallini27-Jan-08 23:32
mveCPallini27-Jan-08 23:32 

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.