Click here to Skip to main content
15,881,380 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionregisterhotkey function affects other applications when my app is still running Pin
Jayapal Chandran5-Aug-10 0:22
Jayapal Chandran5-Aug-10 0:22 
AnswerRe: registerhotkey function affects other applications when my app is still running Pin
Sauro Viti5-Aug-10 1:01
professionalSauro Viti5-Aug-10 1:01 
GeneralRe: registerhotkey function affects other applications when my app is still running Pin
Jayapal Chandran5-Aug-10 9:35
Jayapal Chandran5-Aug-10 9:35 
AnswerRe: registerhotkey function affects other applications when my app is still running Pin
Sauro Viti5-Aug-10 10:45
professionalSauro Viti5-Aug-10 10:45 
GeneralRe: registerhotkey function affects other applications when my app is still running Pin
Jayapal Chandran5-Aug-10 11:55
Jayapal Chandran5-Aug-10 11:55 
QuestionHow to get the Selected Item from CListControl Pin
Sakhalean4-Aug-10 20:30
Sakhalean4-Aug-10 20:30 
QuestionRe: How to get the Selected Item from CListControl Pin
CPallini4-Aug-10 21:04
mveCPallini4-Aug-10 21:04 
QuestionIs it ok to use uninitialized pointer? Pin
Sameerkumar Namdeo4-Aug-10 18:46
Sameerkumar Namdeo4-Aug-10 18:46 
I know its not correct.
-> But can a pointer, to a class which contains only member functions and absolutely no data members, be used to invoke its member functions?

int func_2(int i, float j)
{
    cout << i << j << endl;
    return i;
}

class ABC
{
public:
    int func_1(int i, float j)
    {
        return func_2(i, j);
    }
};

[1] ABC *pObj;
[2] int i = 10;
[3] float f = 20.50f;
[4] int r = pObj->func_1(i, f);


When the above code is executed using VC++2003(version 7.1) following error occurs at line[4]:
Run-Time Check Failure #3 - The variable 'pObj' is being used without being defined.

but even if the error is ignored\ continued then also every thing work properly.
Please suggest :
->Whether this method of using uninitialized pointer is acceptable in any condition?
->Will this work on different platforms?(could not try this, since I do not have accesses to other platform)
->Any pitfalls?
->Your Valuable suggestions.

Thanks in advance.
AnswerRe: Is it ok to use uninitialized pointer? Pin
«_Superman_»4-Aug-10 19:15
professional«_Superman_»4-Aug-10 19:15 
GeneralRe: Is it ok to use uninitialized pointer? Pin
Rick York4-Aug-10 19:34
mveRick York4-Aug-10 19:34 
GeneralRe: Is it ok to use uninitialized pointer? [modified] Pin
Cedric Moonen4-Aug-10 20:48
Cedric Moonen4-Aug-10 20:48 
GeneralRe: Is it ok to use uninitialized pointer? Pin
CPallini4-Aug-10 20:57
mveCPallini4-Aug-10 20:57 
GeneralRe: Is it ok to use uninitialized pointer? Pin
Cedric Moonen4-Aug-10 21:07
Cedric Moonen4-Aug-10 21:07 
GeneralRe: Is it ok to use uninitialized pointer? Pin
CPallini4-Aug-10 21:15
mveCPallini4-Aug-10 21:15 
AnswerRe: Is it ok to use uninitialized pointer? [modified] Pin
bleedingfingers4-Aug-10 21:19
bleedingfingers4-Aug-10 21:19 
AnswerRe: Is it ok to use uninitialized pointer? Pin
Sameerkumar Namdeo4-Aug-10 23:17
Sameerkumar Namdeo4-Aug-10 23:17 
AnswerRe: Is it ok to use uninitialized pointer? Pin
MuraliKrishnaP5-Aug-10 9:44
MuraliKrishnaP5-Aug-10 9:44 
Questionwhy const pointer is NOT const? how to solve the problem? Pin
includeh104-Aug-10 13:12
includeh104-Aug-10 13:12 
AnswerRe: why const pointer is NOT const? how to solve the problem? PinPopular
KingsGambit4-Aug-10 17:02
KingsGambit4-Aug-10 17:02 
AnswerRe: why const pointer is NOT const? how to solve the problem? Pin
Aescleal5-Aug-10 0:02
Aescleal5-Aug-10 0:02 
QuestionHow to get physical memory size available to a process? Pin
Code-o-mat4-Aug-10 11:25
Code-o-mat4-Aug-10 11:25 
QuestionRe: How to get physical memory size available to a process? Pin
norish5-Aug-10 4:38
norish5-Aug-10 4:38 
AnswerRe: How to get physical memory size available to a process? Pin
Code-o-mat5-Aug-10 4:54
Code-o-mat5-Aug-10 4:54 
GeneralRe: How to get physical memory size available to a process? Pin
norish5-Aug-10 19:48
norish5-Aug-10 19:48 
GeneralRe: How to get physical memory size available to a process? Pin
Code-o-mat5-Aug-10 21:55
Code-o-mat5-Aug-10 21: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.