Click here to Skip to main content
15,913,159 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MySQL Inserting data Pin
Anonymous13-Oct-02 10:45
Anonymous13-Oct-02 10:45 
GeneralGetting DNS Server IP Pin
Al Giv.13-Oct-02 0:19
sussAl Giv.13-Oct-02 0:19 
GeneralRe: Getting DNS Server IP Pin
Anders Molin13-Oct-02 0:29
professionalAnders Molin13-Oct-02 0:29 
GeneralQuery about how to pass a control's Identification through its Message parameters Pin
12-Oct-02 22:17
suss12-Oct-02 22:17 
GeneralA beginner's confusion. Pin
zhoujun12-Oct-02 21:33
zhoujun12-Oct-02 21:33 
GeneralRe: A beginner's confusion. Pin
Shog912-Oct-02 21:38
sitebuilderShog912-Oct-02 21:38 
GeneralRe: A beginner's confusion. Pin
zhoujun12-Oct-02 22:00
zhoujun12-Oct-02 22:00 
GeneralRe: A beginner's confusion. Pin
Shog913-Oct-02 5:08
sitebuilderShog913-Oct-02 5:08 
zhoujun wrote:
In a book I have just read said "Tdate td()" is not allowed.

As Joaquín also pointed out, that is correct; i was wrong. (i guess i should probably stick to sleeping at 2:00am...)

new Tdate;
is equivilant to
new Tdate();
however.


zhoujun wrote:
In VB,what is the difference of the following three:
Dim td as new Tdate();
Dim td as new Tdate;
Dim td as Tdate;


The first one declares an array, but gives it no initial size (parentheses are used for arrays as well as function calls in VB)
Actually, i'm not possitive that the first line will work; the syntax seems a bit odd, even for VB, as new is used to instantiate objects, but as the array is initially empty, there is nothing to instantiate.

The second one declares and instantiates a Tdate object.

The third one declares, but does not instantiate a Tdate object; it will need to later be instantiated using new or CreateObject().

Generally in VB6 the use of new in a declaration line is discouraged, as though it's function is to instantiate an object, it does not actually do so until it is first used, at which point it is difficult to gracefully handle failures. In VB.NET, this has been corrected.

(The VB forum would probably be the place to get more confident answers to VB questions...)


Shog9
------

And on the pedestal, these words appear:
"My name is Ozymandias, King of Kings,
Look on my Works, ye Mighty, and despair!"
Nothing beside remains.

GeneralRe: A beginner's confusion. Pin
Joaquín M López Muñoz13-Oct-02 4:34
Joaquín M López Muñoz13-Oct-02 4:34 
GeneralRe: A beginner's confusion. Pin
Shog913-Oct-02 5:09
sitebuilderShog913-Oct-02 5:09 
GeneralUrlEscape Error Pin
John Bosko12-Oct-02 21:04
John Bosko12-Oct-02 21:04 
GeneralRe: UrlEscape Error Pin
Stephane Rodriguez.12-Oct-02 21:33
Stephane Rodriguez.12-Oct-02 21:33 
GeneralRe: UrlEscape Error Pin
Dominik Reichl13-Oct-02 1:45
Dominik Reichl13-Oct-02 1:45 
GeneralRe: UrlEscape Error Pin
Stephane Rodriguez.13-Oct-02 5:43
Stephane Rodriguez.13-Oct-02 5:43 
GeneralA subclassed CStatic control and WM_RBUTTONDOWN Pin
xeonboy12-Oct-02 19:56
xeonboy12-Oct-02 19:56 
GeneralRe: A subclassed CStatic control and WM_RBUTTONDOWN Pin
Gary R. Wheeler13-Oct-02 4:29
Gary R. Wheeler13-Oct-02 4:29 
GeneralScott Meyers' Effective STL :: C++ Pin
valikac12-Oct-02 17:37
valikac12-Oct-02 17:37 
GeneralRe: Scott Meyers' Effective STL :: C++ Pin
Michael Dunn12-Oct-02 18:24
sitebuilderMichael Dunn12-Oct-02 18:24 
GeneralRe: Scott Meyers' Effective STL :: C++ Pin
Jim Crafton12-Oct-02 19:07
Jim Crafton12-Oct-02 19:07 
GeneralRe: Scott Meyers' Effective STL :: C++ Pin
Paul M Watt12-Oct-02 19:52
mentorPaul M Watt12-Oct-02 19:52 
GeneralRe: Scott Meyers' Effective STL :: C++ Pin
Daniel Turini12-Oct-02 22:03
Daniel Turini12-Oct-02 22:03 
GeneralRe: Scott Meyers' Effective STL :: C++ Pin
Paul M Watt12-Oct-02 18:22
mentorPaul M Watt12-Oct-02 18:22 
GeneralRe: Scott Meyers' Effective STL :: C++ Pin
valikac12-Oct-02 18:34
valikac12-Oct-02 18:34 
GeneralHelp pls! Pin
oly200212-Oct-02 16:02
oly200212-Oct-02 16:02 
GeneralRe: Help pls! Pin
tongc12-Oct-02 16:37
tongc12-Oct-02 16:37 

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.