|
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
|
|
|
|
|
typedef is your friend when dealing with complex types:
typedef char* (*func1)();
typedef func1 (*func2)();
func2 myarray[N];
|
|
|
|
|
int test = 1 + 2 + 3;
+2 + 3 +4;
after I compile with Visual studio 6 or .net
the answer test is 6
Is there anyone know what is weird ? the compiler will not have any error message, is this kind of bug ?
Thanks for advance.
coding is just the beginning
|
|
|
|
|
Of course
int test = 1 + 2 + 3;
equals 6.
+2 + 3 +4;
is a seperate expression. Remove the first semicolon if you want to connect the two expressions.
int test = 1 + 2 + 3 +2 + 3 +4;
will result in test == 15.
|
|
|
|
|
Sofian Teja wrote: int test = 1 + 2 + 3;
Evaluates to 6 (according to Adam Riese).
Sofian Teja wrote: +2 + 3 +4;
Is an empty expression (it does nothing), always switch on your compiler warnings and you will be notified when such things happen accidentally. Related articles: Getting pragmatic with warnings, here and here.
Hope it helps.
|
|
|
|
|
Any expression can also be a statement. The statement
+2 + 3 +4;
is perfectly legal. It calculates the value and does nothing with it. (Of course, in optimized builds, the statement will be removed since it does nothing and has no side effects.)
|
|
|
|
|
hi to all!
would like to ask..
can priority be implemented using linked list?
if yes, can you please show me how?
thanks a lot!
newbie
|
|
|
|
|
Yea It can be.
The main logic change will be while "Inserting" a new item.
While Inserting a new "Item" of say "n" priority you have to check that it should be inserted at last item of the same priority but before a low priority item.
Manoj
Never Give up
|
|
|
|
|
hi manojkumarrai! thanks for the reply...
for the implementation... should i have pointer to the last item for each priority category?
thanks!
newbie
|
|
|
|
|
|
Hi all,
Can anybody plz tell me how to use GetExitCodeThread Function.
my thread object is CloseTh.I am not getting how to pass second parameter.
DWORD lpExitCode;
GetExitCodeThread(CloseTh->m_hThread,lpExitCode);
when i write this,this error is coming
cannot convert parameter 2 from 'unsigned long' to 'unsigned long *'
thanks in advance
|
|
|
|
|
DWORD lpExitCode=0;
GetExitCodeThread(CloseTh->m_hThread,&lpExitCode);
|
|
|
|
|
Whitesky was quick to answer.
neha.agarwal27 wrote: DWORD lpExitCode;
Do make a habit to initialize the variables.
Regards,
Vijay.
God may not give us what we 'want', but he surely gives us what we 'need'.
|
|
|
|
|
Read the error message. The function takes a pointer to an unsigned long but you are passing an unsigned long . (DWORD is a typedef that resolves to unsigned long .) You need to pass the address of that DWORD variable. Fixing the Hungarian prefix would be nice too.
|
|
|
|
|
how to create IPAddress control with the style IPAS_NOVALIDATE
|
|
|
|
|
|
I can't find IPAS_NOVALIDATE defined in any of my platform SDK/MSDN files.
What is it?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I am playing movie in directshow . now I want to fastforward the movie
2x 3x 4x etc . also I want to rewind the movie. can any body tell me
how it is possible
RajeshGupta
|
|
|
|
|
On the MCI functions you can use of MCI_DGV_SET_SPEED see MCI_SET[^]
|
|
|
|
|
I want to fastforward and rewind in localfile scenario . i .e
I am using the .asf or .wmv file .
RajeshGupta
|
|
|
|
|
|
Hi,
I know that but problem is that when I set g_pSeek->SetRate(2.0);
it fast forward for few milli seconds then again playback with
normal speed . again tell me how to rewind the playback.
RajeshGupta
|
|
|
|
|
That's going to depend on the filters in the graph.
For example, if you are playing ASF files with the Windows Media ASF Reader filter, then
SetRate() isn't supported for any speeds except 1.0.
IMediaSeeking::GetCapabilities() will give you info on supported seeking capabilities (including
reverse playback).
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I think use of MCI_DGV_SET_SPEED is easy,isnt ?
|
|
|
|
|
Yes but the OP is using DirectShow
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|