Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about the .h file in c and C++ Pin
David Crow31-Mar-08 3:51
David Crow31-Mar-08 3:51 
GeneralRe: about the .h file in c and C++ Pin
wendyyue31-Mar-08 4:16
wendyyue31-Mar-08 4:16 
QuestionRe: about the .h file in c and C++ Pin
David Crow31-Mar-08 4:19
David Crow31-Mar-08 4:19 
GeneralRe: about the .h file in c and C++ Pin
wendyyue31-Mar-08 7:38
wendyyue31-Mar-08 7:38 
GeneralRe: about the .h file in c and C++ Pin
wendyyue31-Mar-08 18:35
wendyyue31-Mar-08 18:35 
GeneralRe: about the .h file in c and C++ Pin
David Crow1-Apr-08 3:23
David Crow1-Apr-08 3:23 
GeneralRe: about the .h file in c and C++ Pin
wendyyue1-Apr-08 6:15
wendyyue1-Apr-08 6:15 
QuestionDefault initialisation of POD types? Pin
Klempie30-Mar-08 23:34
Klempie30-Mar-08 23:34 
Well it's been a long time since I was last on here. More to the point, it's been a long time since I coded in C++. I have been consigned to the spineless world of VB6 for the last year and a half unfortunately. (Looks around for a sympathetic shoulder to cry on)

Anyway, I've got a small project on the go and there was something I just wanted to query on. Having been spoilt (and I don't mean that in a good way cos I've got sloppy) with zero-initialisation of basic types in VB6, I was wondering if there is a setting in Visual C++ 2003 compiler which forces the compiler to zero-initialise basic types? I seem to recall some compilers (like GNU ones) are able to be configured to do this. I know it's less efficient but I like being able to start using variables "clean" as it were. I know there is default initialisation defined by ANSI C++ which works like this:

int * someint = new int();

but that seems awfully awkward and looks like it'll cause headaches. Having to keep a lookout for pointer management of basic types seems like a pain. I just want to be able to configure the compiler so I can go:

int someint;

and know that after the declaration it'll be zeroed out. I know there is also memset, but it just makes the code messier.

Or perhaps I should just be a good boy and initialise everything explicitly?
AnswerRe: Default initialisation of POD types? Pin
Matthew Faithfull31-Mar-08 0:38
Matthew Faithfull31-Mar-08 0:38 
GeneralRe: Default initialisation of POD types? Pin
Klempie31-Mar-08 0:58
Klempie31-Mar-08 0:58 
Generalclient-server communication Pin
Paulraj G30-Mar-08 21:31
Paulraj G30-Mar-08 21:31 
GeneralRe: client-server communication Pin
CPallini30-Mar-08 21:37
mveCPallini30-Mar-08 21:37 
GeneralRe: client-server communication Pin
Jhony george31-Mar-08 0:04
Jhony george31-Mar-08 0:04 
GeneralRe: client-server communication Pin
Paulraj G31-Mar-08 0:41
Paulraj G31-Mar-08 0:41 
GeneralRe: client-server communication Pin
Jhony george31-Mar-08 1:14
Jhony george31-Mar-08 1:14 
GeneralRe: client-server communication Pin
David Crow31-Mar-08 4:02
David Crow31-Mar-08 4:02 
GeneralMS-Access Database with Visual C++2005. Pin
Le@rner30-Mar-08 20:02
Le@rner30-Mar-08 20:02 
GeneralRe: MS-Access Database with Visual C++2005. Pin
Saurabh.Garg30-Mar-08 20:14
Saurabh.Garg30-Mar-08 20:14 
GeneralRe: MS-Access Database with Visual C++2005. Pin
Le@rner30-Mar-08 20:48
Le@rner30-Mar-08 20:48 
GeneralRe: MS-Access Database with Visual C++2005. Pin
Saurabh.Garg30-Mar-08 21:24
Saurabh.Garg30-Mar-08 21:24 
GeneralRe: MS-Access Database with Visual C++2005. Pin
Le@rner30-Mar-08 21:35
Le@rner30-Mar-08 21:35 
GeneralRe: MS-Access Database with Visual C++2005. Pin
Saurabh.Garg30-Mar-08 21:47
Saurabh.Garg30-Mar-08 21:47 
GeneralRe: MS-Access Database with Visual C++2005. Pin
Le@rner30-Mar-08 22:24
Le@rner30-Mar-08 22:24 
GeneralRe: MS-Access Database with Visual C++2005. Pin
Le@rner30-Mar-08 23:44
Le@rner30-Mar-08 23:44 
GeneralRe: MS-Access Database with Visual C++2005. Pin
CPallini30-Mar-08 21:34
mveCPallini30-Mar-08 21:34 

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.