Click here to Skip to main content
15,919,778 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple assignment Pin
Dominik Reichl1-Nov-03 1:29
Dominik Reichl1-Nov-03 1:29 
GeneralWhat should this do? Pin
Vancouver1-Nov-03 6:29
Vancouver1-Nov-03 6:29 
QuestionHow many ways to get machine name of localhost? Pin
George231-Oct-03 20:38
George231-Oct-03 20:38 
AnswerRe: How many ways to get machine name of localhost? Pin
User 2155971-Nov-03 3:15
User 2155971-Nov-03 3:15 
GeneralRe: How many ways to get machine name of localhost? Pin
George21-Nov-03 18:01
George21-Nov-03 18:01 
Questioncrystal report problem? Pin
murali_utr31-Oct-03 20:36
murali_utr31-Oct-03 20:36 
GeneralDisplay properties, DPI Pin
Vancouver31-Oct-03 20:32
Vancouver31-Oct-03 20:32 
QuestionCan Anyone Explain this !! :) Pin
Abhishek Srivastava31-Oct-03 18:43
Abhishek Srivastava31-Oct-03 18:43 
HI All ,Smile | :)
I am a VC++ programmer,and some time My Acumen ask Microsofts VC++ (Visual Studio VC++ 6.0 )complier to complile my senseless programs ! Smile | :)

See what I have asked this time to compile !!..

This is console based program, in which i am trying to call Member function of My class With a NULL pointer .
And it is working fine....Cool | :cool:
Please some one explain this to me ....is this happening of coz Compiler is fed up with my programs !! Big Grin | :-D

#include "stdafx.h"
#include <iostream.h>

class A
{
public :
int var;
A()
{
cout<<"In Consrtuctor !!";
}

~A()
{
cout<<"\nClass destroyed !!\n";
}

void EvenNullPointerCanCallme(int a);
};


void A::EvenNullPointerCanCallme(int a)
{
int *aa=new int[100];
cout<<"\nHow is that possible !!\n";
delete []aa;
}

int main(int argc, char* argv[])
{
A *nullPtr=NULL;//see i made it NULL

nullPtr->EvenNullPointerCanCallme(2);//How daring i am Smile | :)

delete nullPtr;//I cannot call destructor !

return 0;
}


Are member functions statically linked with the Object name !!

Actually i never found any concept of accessing Class member function with NULL pointers in Any of C++ books Which I have read (Plz let me know if u people have found it in any book !).

I am grateful to all u peoples who had a look at my program !!
Now see i am getting famous or what Smile | :)


Abhishek Srivastava
1.5 Year Old Software Engg (VC++)
India ,Noida
Mobile no 9891492921 Smile | :)
AnswerRe: Can Anyone Explain this !! :) Pin
Michael Dunn31-Oct-03 19:46
sitebuilderMichael Dunn31-Oct-03 19:46 
GeneralRe: Can Anyone Explain this !! :) Pin
Antti Keskinen1-Nov-03 11:10
Antti Keskinen1-Nov-03 11:10 
GeneralRe: Can Anyone Explain this !! :) Pin
Roger Allen1-Nov-03 12:58
Roger Allen1-Nov-03 12:58 
GeneralCImageList Color problem Pin
Shah Shehpori31-Oct-03 18:23
sussShah Shehpori31-Oct-03 18:23 
GeneralRe: CImageList Color problem Pin
atif_ilm@yahoo.com31-Oct-03 18:55
sussatif_ilm@yahoo.com31-Oct-03 18:55 
GeneralTranslate ascii character Pin
percyvimal31-Oct-03 17:57
percyvimal31-Oct-03 17:57 
GeneralTranslate the ascii character into extended ascii character Pin
percyvimal31-Oct-03 17:54
percyvimal31-Oct-03 17:54 
Generalconvert CTime data (c++) to Date data (VB). Pin
rajdawg31-Oct-03 15:39
rajdawg31-Oct-03 15:39 
GeneralRe: convert CTime data (c++) to Date data (VB). Pin
Anthony_Yio31-Oct-03 18:37
Anthony_Yio31-Oct-03 18:37 
GeneralRe: convert CTime data (c++) to Date data (VB). Pin
rajdawg1-Nov-03 9:38
rajdawg1-Nov-03 9:38 
QuestionHow can I query disk space Pin
devvvy31-Oct-03 15:19
devvvy31-Oct-03 15:19 
AnswerRe: How can I query disk space Pin
Ravi Bhavnani31-Oct-03 15:30
professionalRavi Bhavnani31-Oct-03 15:30 
AnswerRe: How can I query disk space Pin
Garth J Lancaster31-Oct-03 16:27
professionalGarth J Lancaster31-Oct-03 16:27 
QuestionHow can you check if dot-NET framework is installed on a computer? Pin
devvvy31-Oct-03 15:15
devvvy31-Oct-03 15:15 
Generalhelp with photoshop 7.0 Pin
Snyp31-Oct-03 14:43
Snyp31-Oct-03 14:43 
GeneralRe: help with photoshop 7.0 Pin
ZoogieZork1-Nov-03 11:38
ZoogieZork1-Nov-03 11:38 
GeneralCFontDialog: Hiding underline and strikeout Pin
Joe Woodbury31-Oct-03 11:55
professionalJoe Woodbury31-Oct-03 11:55 

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.